summaryrefslogtreecommitdiff
path: root/scraper
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2019-06-05 16:13:19 +0200
committerjules@lens <julescarbon@gmail.com>2019-06-05 16:13:19 +0200
commit887fe50665acd6cb25ce094acd44abb5389e8c14 (patch)
treea2a15900f52d3eddeda42cb5052606d33098a43d /scraper
parentac48ea728c25fd92c7acdb70da92d778f1cc5012 (diff)
update
Diffstat (limited to 'scraper')
-rw-r--r--scraper/s2-search-deep.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scraper/s2-search-deep.py b/scraper/s2-search-deep.py
index 93be3bea..ab44c351 100644
--- a/scraper/s2-search-deep.py
+++ b/scraper/s2-search-deep.py
@@ -31,7 +31,10 @@ MAX_PAGES = 20
def fetch_query(query, since=None, refresh=False):
clean_title = re.sub(r'[^-0-9a-zA-Z ]+', '', query)
- yearFilter = {'min': since, 'max': 2020 } if since else None
+ if since and since != '#N/A':
+ yearFilter = {'min': since, 'max': 2020 }
+ else:
+ yearFilter = None
results_path = './datasets/s2/search/{}'.format(clean_title)
os.makedirs(results_path, exist_ok=True)
page = 1