[go: nahoru, domu]

Skip to content

Commit

Permalink
Update google.py for date filter
Browse files Browse the repository at this point in the history
update google date filter so can crawl for more images
  • Loading branch information
richylyq committed Apr 21, 2023
1 parent 3506401 commit d21644b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion icrawler/builtin/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,16 @@ def format_license(license):

# date filter
def format_date(date):
if date == 'pastday':
if date == 'anytime':
return ''
elif date == 'pastday':
return 'qdr:d'
elif date == 'pastweek':
return 'qdr:w'
elif date == 'pastmonth':
return 'qdr:m'
elif date == 'pastyear':
return 'qdr:y'
elif isinstance(date, tuple):
assert len(date) == 2
date_range = []
Expand Down

0 comments on commit d21644b

Please sign in to comment.