Closed insaiyancvk closed 2 years ago
A little workaround I found was
self.driver.execute_script("window.scrollTo(0, "+str(indx*60)+");")
add this snippet at https://github.com/ohyicong/Google-Image-Scraper/blob/5fd2e59add64a9c03ef069b80d832bc10cd35911/GoogleImageScrapper.py#L91-L96 in this exception block
And remove everything else in this block https://github.com/ohyicong/Google-Image-Scraper/blob/5fd2e59add64a9c03ef069b80d832bc10cd35911/GoogleImageScrapper.py#L91-L98
Okay let me review the code
Okay I just fixed it.
When the code executes the following block
https://github.com/ohyicong/Google-Image-Scraper/blob/5fd2e59add64a9c03ef069b80d832bc10cd35911/GoogleImageScrapper.py#L86-L96
And it hits google's "Related searches" it stops the code.![image](https://user-images.githubusercontent.com/53230977/137547805-cd9c6c2b-8c19-4260-ba1d-02b4d7a90d86.png)