I want to be able to set the number of pages that make scraper crawls on google.
I'm confused on where to start. I don't really use the scraper opening multiple pages at once but by requesting them one at a time.
import requests
import re
keywords = ["site:facebook.com", "@gmail.com", "sports"]
url = 'https://google.com/search?q={}'.format('+'.join(keywords))
print(url)
response = requests.get(url)
regex = r"[\w._-]+@[\w._-]+\.[\w._-]+"
emails = re.findall(regex, str(response.content))
emails_list = list(set(emails))
print(emails_list)
It works fine when scraping the first page.