I make a site parser on Python, but faced a problem. When I press the transition button to the next catalog window, the URL does not change any manner. I read in Google and realized that it was implemented through AJAX queries (I hope did not confuse). The question is how I go to other page pages via URL? Found an article in which following the instructions, I realized that when you press the transition button to the next page, an XHR query comes with a dictionary. I would be grateful if someone even pumps out to think about how to implement it. Thank you
Answer 1, Authority 100%
Content loading occurs not only by URL
, which you see in the address bar of the browser, the content can also be loaded using XHR . To see how exactly this happens, open developer tools in the browser and go to The Network
tab. Next, go through the pages and see what requests and where run.
Let’s look at an example from the comment on the question (https://steamcommunity.com/market/listings/730/glock-18%20%7C%20High%20Beam%20%28Factory%20New%29
).
It can be seen that receiving content on the pages is at the address: https://steamcommunity.com/market/listings/730/glock-18%20%7C%20High%20Beam%20%28Factory%20New%29/ Render /? query = & amp; start = 0 & amp; count = 10 & amp; country = ru & amp; language = russian & amp; currency = 1
In Query Request this URL, the parameters of Start
and count
, which indicate which element to start and how many elements are obtained, respectively