Improve URL parsing for full size images (#521)

Skip URLs that are not two-element lists

Fixes #520
pull/522/head
Fabian Schilling 3 years ago committed by GitHub
parent 3784d897d9
commit 9ad1d60a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save