Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenght of image container #5

Open
aravind93raja opened this issue Apr 26, 2019 · 4 comments
Open

Lenght of image container #5

aravind93raja opened this issue Apr 26, 2019 · 4 comments

Comments

@aravind93raja
Copy link

img_container = scraper.find_all("div", {"class":"z_c_b"})

img_container value gets stored as 1 .

So not able to retrieve all images in the page.

how do I solve this ?

@chuanenlin
Copy link
Owner

@aravind93raja Looks like shutterstock updated their page layout again - I've updated the script. Let me know if it works now!

@aravind93raja
Copy link
Author

@aravind93raja Looks like shutterstock updated their page layout again - I've updated the script. Let me know if it works now

Yes ,It works fine now .Thanks.

Out of interest , How do I know what parameters to change based on the website?
( Like If I want to write a similar code to Download from google images or someother website?)

@chuanenlin
Copy link
Owner

chuanenlin commented Apr 26, 2019

Great to hear. You can check the DOM structure of the site (in Chrome, you can use inspect element). In a nutshell, the scraper scans individual elements/element arrays in decreasing orders of hierarchy until it finds the "img" tag and obtains the "src" attribute of the tag which is the link to the image.

@stanistolberg
Copy link

stanistolberg commented Dec 13, 2020

@chuanenlin Hello! Why the scraper scrapes only 20 images per page while Shutterstock shows 150? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants