From 5ca5a6f445e37d52e8fc924e46ab77a9bcc99f1e Mon Sep 17 00:00:00 2001 From: Anson Lai Date: Wed, 25 May 2022 10:06:36 -0700 Subject: [PATCH] bug fix --- scrape.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scrape.py b/scrape.py index 907223e..f233006 100644 --- a/scrape.py +++ b/scrape.py @@ -119,6 +119,7 @@ class Webdriver: for url in upcoming_urls: if len(visited_urls) % 50 == 0: save_session() + if url.startswith('GUID') and url.endswith('.html'): self.driver.get(base_url + url) else: @@ -142,7 +143,8 @@ class Webdriver: print("images: " + str(len(set(img_urls)))) append_upcoming_and_img_urls(source) - if len(visited_urls) % 150 == 0: + + if len(visited_urls) % 151 == 0: self.restart_scrape() def get_imgs(self):