diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-06-05 16:13:38 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-06-05 16:13:38 +0200 |
| commit | f4a7f2432768568c39c1311825149e1f1a50c85d (patch) | |
| tree | 997b85d1ba5542e61d400daf77690cc512f121cc /scraper/s2-search-deep.py | |
| parent | 697a21610f67f6864c766a5378b873f92862858b (diff) | |
| parent | 887fe50665acd6cb25ce094acd44abb5389e8c14 (diff) | |
Merge branch 'master' of asdf.us:megapixels_dev
Diffstat (limited to 'scraper/s2-search-deep.py')
| -rw-r--r-- | scraper/s2-search-deep.py | 5 |
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 |
