Open LaurentMertens opened 7 months ago
@LaurentMertens Thanks a lot, this fixed my issue! @Vorrik can you please merge this? Thanks 🙏🏻
Sorry for the late reply, will check soon
@FlorianMgs @LaurentMertens Could you try this ` import requests
from http.cookiejar import DefaultCookiePolicy
s = requests.Session()
s.cookies.set_policy(DefaultCookiePolicy(blocked_domains=['consent.google.com']))
rev_img_searcher = ReverseImageSearcher(s)
res = rev_img_searcher.search(image_url) `
I get an error:
File "[...]/env/lib/python3.12/site-packages/google_img_source_search/image_uploader.py", line 21, in extract_image id_2 = py_obj['ds:0']['request'][1][7][0]
IndexError: list index out of range
I get an error:
File "[...]/env/lib/python3.12/site-packages/google_img_source_search/image_uploader.py", line 21, in extract_image id_2 = py_obj['ds:0']['request'][1][7][0]
IndexError: list index out of range
Hmm, I haven't been able to get this error yet. What country? Do you use proxy? Does the problem appear in time of first search? Can you also send img url
Upated upload_image.py so that when the first response is a "Accept/Reject cookie" page, the option "Reject all" is automatically selected.