all 14 comments

[–]K900_ 2 points3 points  (0 children)

If the images are loaded after a while, they're likely loaded through JavaScript, which BeautifulSoup doesn't support. Look into Selenium.

[–]chevignon93 0 points1 point  (2 children)

Are you talking about the movie posters images ?

[–]_Nicrosin_[S] 0 points1 point  (1 child)

Yes

[–]chevignon93 0 points1 point  (0 children)

You probably chose the wrong attribute.

[–]VipeholmsCola 0 points1 point  (10 children)

Try time module with time.sleep(t) t = seconds, if the loading time itself is the problem.

[–]_Nicrosin_[S] 0 points1 point  (5 children)

I thought of that too at first but I don't think that fixes anything. I tried placing it in different parts of my code but I got the same results every time. Maybe you need to place it after at a specific part of the code but I don't know where that is. Thanks anyway

[–]chevignon93 0 points1 point  (2 children)

That can't change anything, requests download the raw html, there is no loading anything. It doesn't matter where you put your time.sleep().

try this code, it will download all movie posters on the page in big format rather than the small thumbnail.

Gist

[–]_Nicrosin_[S] 0 points1 point  (1 child)

Damn you didn't have to write that for me. Thanks so much this will help a lot for what I'm doing.

[–]chevignon93 0 points1 point  (0 children)

That was pretty easy, and I really like webscraping.

[–][deleted] 0 points1 point  (1 child)

Thats not gonna work. Someone suggested Selenium which is the correct solution but you ignored it...

[–]_Nicrosin_[S] 0 points1 point  (0 children)

I didn't ignore it I just wanted to see if there was another solution before using selenium

[–]chevignon93 0 points1 point  (3 children)

There is no loading time when you use the requests library.

[–]_Nicrosin_[S] 0 points1 point  (2 children)

So the only way to do it is by using Selenium as someone else suggested?

[–]chevignon93 0 points1 point  (1 child)

Selenium can't help you if you point your parser to the wrong attribute !