chuanenlin/shutterscrape

Script runs through pages but does not scrape any images

fellowProgrammer opened this issue · 4 comments

I am having a wired issue running this script. It has worked fine before, but now all of a sudden the script seems to visit however many pages I tell it to but it does not scrape any images from it (refer to screenshot below). The only thing I have modified in the script is, under def imageScrape: I have commented out the line driver.maximize_window() since the chromedriver is having trouble maximizing the screen and that line seems to crash the script, but otherwise the script is exactly the same. I have already tried copying and pasting the original script from here and just commenting that line out to make sure it was the only change. The script has worked before perfectly fine, I have no idea why it started doing this. What could be the problem?

Terminal Screen Shot

screen shot 2019-03-01 at 9 14 59 am

I have found out that the variable img_container is empty for some reason when I am running the script. This is most likely the cause of the problem. Why it is empty I still do not have any idea, could it be the Shutterstock has changed the HTML for their website?

The contents of this comment are completely unrelated to my issue.

I just saw that you have added a script to scrape videos from getty images. Whenever you get time, it would be awesome to have a script to scrape images from getty images!

@fellowProgrammer You are correct - Shutterstock seems to have restructured their page layout. I've updated the code and hopefully it should work now. I'll have a look into scraping images from Getty Images sometime in the near future - thanks for the suggestion. :)

The updated script seems to work like a charm 👍 . Thanks for the fix!