Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a Perl web crawler follow an ASP.NET postback?

I'm building a webcrawler in Perl/LWP. How can the webcrawler follow a link in a ASP.NET grid like this:

<a id="ctl00_MainContent_listResult_Top_LnkNextPage" href="javascript:__doPostBack('ctl00$MainContent$listResult$Top$LnkNextPage','')">Next</a>
like image 805
prip Avatar asked Nov 05 '22 20:11

prip


2 Answers

Looks like there's a WWW::Mechanize subclass called WWW::Scripter with javascript and ajax plugins that should be able to do this. Haven't tried that particular approach.

The other alternative is WWW::Selenium, which works great but may be too much overhead/setup for you.

like image 200
ysth Avatar answered Nov 14 '22 02:11

ysth


See CPAN module HTML::TreeBuilderX::ASP_NET.

like image 34
Alexandr Ciornii Avatar answered Nov 14 '22 01:11

Alexandr Ciornii