Created
January 11, 2022 13:07
-
-
Save MagicMagnate/f4872f1d7a2e7212c82ea6b3e91fe1d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_results(url): | |
query = urllib.parse.quote_plus(url) | |
response = get_source("https://www.google.co.uk/search?q=site%3A" + url) | |
return response | |
def parse_results(response): | |
string = response.html.find("#result-stats", first=True).text | |
indexed = int(string.split(' ')[1].replace(',','')) | |
return indexed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment