pruthvik-sheth / google-images-scraper

Google images scrapper in full resolution with multi threading speed.
MIT License
15 stars 3 forks source link

Suggested feature to refuse additional cookies when connecting from EU #6

Open giovsta opened 1 year ago

giovsta commented 1 year ago

I added this line very quickly, after line 44 in the file scraper.py, contained in the "scraping" folder:

driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")
driver.find_element(By.ID, "W0wltc").click()

it works as intended, as I needed it to click to not accept additional cookies when it opens the google images pages in incognito mode, and I suggest you to add it for those connecting from the EU, maybe with a check so that if it does not appear for users from other countries it does not give an error.

I cannot provide the edit myself as I don't have git here and I am not savy with contributions on github yet.

I hope this helps, as this tool helped me immensely.

pruthvik-sheth commented 1 year ago

Thank you for your important suggestion. However, I can't replicate the issue that you are describing by connecting to EU servers via VPN. So, can you provide any related screen shots if possible?

giovsta commented 1 year ago

github This is the popup that is superimposed on the google images website the first time you open the page (or when you do it in incognito mode) github This is the full window