prateekmehta59 / Celebrity-Face-Recognition-Dataset

Dataset of around 800k images consisting of 1100 Famous Celebrities and an Unknown class to classify unknown faces
https://drive.google.com/drive/folders/0B5G8pYUQMNZnLTBVaENWUWdzR0E?usp=sharing
Creative Commons Attribution 4.0 International
138 stars 38 forks source link

Searches turn up empty #4

Open vwadia opened 1 year ago

vwadia commented 1 year ago

Hi Prateek! I'm running this from Windows 10, Chrome Version 109.0.5414.75, and Python 3.7/2.7 (I've tried both) and when using with 3.7 I get an error

Item no.: 1 --> Item name = Tom Hanks Evaluating...

Traceback (most recent call last): File "celebrity_images_download.py", line 110, in items = items + (_images_get_all_items(raw_html)) File "celebrity_images_download.py", line 72, in _images_get_all_items item, end_content = _images_get_next_item(page) File "celebrity_images_download.py", line 55, in _images_get_next_item start_line = s.find('rg_di') AttributeError: 'NoneType' object has no attribute 'find' And with Python 2.7 everything runs without error but the folder is always empty. Do you have any insight into what the issue could be? Particularly with 2.7? I guess it can't access any webpages. I have disabled all my extensions that block trackers and even the4 adblocker. Let me know!
shivangi3001 commented 1 year ago

Hi @vwadia, Not completly sure why you are getting error while using python3. But I tried the same code to download images in a folder and everytime I get this as an output, along with an empty folder " Item no.: 1 --> Item name = Tom Hanks Evaluating... Total Image Links = 0

Total time taken: 2.445718288421631 Seconds Starting Download...

Everything downloaded! 0 ----> total Errors "

when I looked for the error and research a bit found that "it has been reported that Google has implemented a new security feature that restricts automated download requests like this one. As a result, web scraping from Google has become very difficult, and in some cases impossible. If you are using this script, you may need to look for alternative ways to download images from Google."

vwadia commented 1 year ago

Hi shivangi3001! Thank you for the heads up. That does explain a lot. However I tried changing the URL so the search would go through bing rather than google and still no luck. There are plenty of other search engines to try so I will see if any of them work.

rohit-singh-git commented 1 week ago

Hi @vwadia and @shivangi3001,

I have worked on resolving the issue. You can review my changes in the repository here: Bing Image Downloader.