Skip to content Skip to sidebar Skip to footer

Html Missing When Using View Page Source

Im trying to extract all the images from a page. I have used Mechanize Urllib and selenium to extract the Html but the part i want to extract is never there. Also when i view the p

Solution 1:

Possibly you're trying to get elements that are created with a client sided script. I don't think javascript elements run when you just send a GET/POST request (which is what I'm assuming you mean by "view source").


Solution 2:

At the time I was not aware how much content is loaded in through js after the page is loaded. Mechanize does not have a JavaScript interpreter. The way I ended up solving this is extracting the links from the *.js file and redoing the get commend with urllib and getting the required content that way.


Post a Comment for "Html Missing When Using View Page Source"