Skip to content

Instantly share code, notes, and snippets.

@MagicMagnate
Created January 11, 2022 13:07
Show Gist options
  • Save MagicMagnate/f4872f1d7a2e7212c82ea6b3e91fe1d0 to your computer and use it in GitHub Desktop.
Save MagicMagnate/f4872f1d7a2e7212c82ea6b3e91fe1d0 to your computer and use it in GitHub Desktop.
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