Created
August 13, 2020 15:33
-
-
Save jmrobles/5b3293f0afbe3091cbf8bd87ae552466 to your computer and use it in GitHub Desktop.
Main loop to scrap the links with Selenium
This file contains hidden or 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
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