Improve URL parsing for full size images (#521)
Skip URLs that are not two-element lists Fixes #520main
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…
Reference in New Issue