mirror of
https://github.com/benbusby/whoogle-search.git
synced 2025-07-09 03:04:13 -04:00
Improve URL parsing for full size images (#521)
Skip URLs that are not two-element lists Fixes #520
This commit is contained in:
parent
3784d897d9
commit
9ad1d60a47
@ -381,6 +381,10 @@ class Filter:
|
||||
for item in results_all:
|
||||
urls = item.find('a')['href'].split('&imgrefurl=')
|
||||
|
||||
# Skip urls that are not two-element lists
|
||||
if len(urls) != 2:
|
||||
continue
|
||||
|
||||
img_url = urlparse.unquote(urls[0].replace('/imgres?imgurl=', ''))
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user