Answer the question
In order to leave comments, you need to log in
How to make a parser in python, given that the page transition is carried out in javascript?
Good afternoon!
I just started to disassemble python and don't know much about it.
Faced such a problem using the article gis-lab.info/qa/scrapy.html as an example, I made a parser, but when I started to remake it for my needs, namely:
Make a site parser https://bankrot.fedresurs.ru/ArbitrManagersList.aspx to get all FIO and URL saw that all pagination is done using the ajax request method. How can I make a parser using python? Thanks in advance!
Answer the question
In order to leave comments, you need to log in
In this case, it is enough to set the AmListSearch cookie to PageNumber=N, request a page at the same address and receive in response a list opened immediately from page N.
For example:
$ curl --cookie "AmListSearch=PageNumber=12" https://bankrot.fedresurs.ru/ArbitrManagersList.aspx > bankrot.html
$ firefox bankrot.html
Alternatively, in theory, you can tie PhantomJS as a webdriver for Selenium. Actually, I haven't tried it myself. When there was a task of parsing sites, it was easier for me to transfer directly to PhantomJS / SlimerJS. But there were many sites with a similar structure and it was not possible to figure out with your hands where ajax is and where it is not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question