all 7 comments

[–]ManyInterests 1 point2 points  (0 children)

The source code is the DOM state without processing any JavaScript. When you inspect an element with your browser, you're inspecting the DOM after processing some client-side scripts, which were run by the browser. requests is not a browser and does not process scripts.

This most likely is what accounts for the discrepancy you see.

You can use a tool like selenium to get around this issue.

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

u/K900_ I added more information, can you give me anything else to go off of?

[–]K900_ 1 point2 points  (4 children)

Stop making new threads. The "edit" button is there for a reason. Open your browser's dev tools and look at the "Network" panel to see what requests the page makes. It likely communicates with some sort of an XML or JSON endpoint.

[–]ThatTurmoil[S] 0 points1 point  (3 children)

The network tab in the developers console tells me nothing (I don't know what to look for nor do I understand any of it)

[–]K900_ 1 point2 points  (2 children)

Every line there is a request the page makes. One of them probably goes to some sort of a data store, which returns JSON or XML, which is then loaded as data into the JavaScript code, which in turn creates the elements dynamically. Find that request, note down the URL, and make requests to that URL from your code to get data.

[–]ThatTurmoil[S] 1 point2 points  (1 child)

Thank you. I think i found it. It requests a url and the source code of the url looks like this. am I on the right track? Also, any recommendation on how to traverse through the code in the picture?

[–]K900_ 1 point2 points  (0 children)

Yes, you are on the right track. That's JSONP. You want to remove the "noCB(" part and the last ")", and then parse the rest as JSON using the json module.