Answer the question
In order to leave comments, you need to log in
How to make a page parser using Grab?
Good afternoon!
I came across one problem related to parsing the site https://bankrot.fedresurs.ru/ArbitrManagerCard.asp...
I can't figure out how to navigate through the message pages. In the Form Data section (Network panel) there is a parameter with the value __EVENTARGUMENT=Page$2. I tried to add it in this way g.setup(post={'__EVENTARGUMENT':'Page$2'})
to the example below, but there were no results, please tell me how to solve this problem. Thanks in advance!
Below is an example code:
from grab import Grab
g = Grab()
g.setup(document_charset='utf-8')
g.go('https://bankrot.fedresurs.ru/ArbitrManagerCard.aspx?ID=14431')
for messages in g.doc.select('//table[@id="ctl00_cphBody_gvMessages"]/tr'):
for item in messages.select('./td[1]'):
print(item.text())
Answer the question
In order to leave comments, you need to log in
Well, in addition to '__EVENTARGUMENT':'Page$2' , it also passes a bunch of parameters.
Intercept them too, and pass them with the request in the same way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question