Skip to content

Instantly share code, notes, and snippets.

@jmrobles
Created August 13, 2020 15:33
Show Gist options
  • Save jmrobles/5b3293f0afbe3091cbf8bd87ae552466 to your computer and use it in GitHub Desktop.
Save jmrobles/5b3293f0afbe3091cbf8bd87ae552466 to your computer and use it in GitHub Desktop.
Main loop to scrap the links with Selenium
scrapper = ScraperWebJS()
scraped_urls = []
for url in tqdm(urls):
try:
content = scrapper.scrape(url)
except Exception as err:
print(f"Error can't scrape {url} => {err}")
continue
if content is None:
continue
scraped_urls.append({'url': url, 'content': content})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment