Reputation: 113
With a cURL login operation I entered in a webpage, but now I have to go to sublinks .
the problem is that in this website the links don't work with
<a href="*.php">
works with
<a href="JavaScript:top.openBranch('name')"> Name </a>
someone knows how to do this ? how to go to this link ?
ths !!
Upvotes: 1
Views: 1711
Reputation: 39395
It is very easy to parse the normal links from HTML. But the links which are having javascript actions accosiated with it are different from site's to site(every site has their own functionality).
You have to use some sort of tool that will allow you to capture the requested links(when clicked on a javascript based link). Then from your curl you can call the links again.
You can use firebug if you are using firefox. Or you can use network sniffers like wireshark, ether detect, etc softwares.
Additionally, the Python library named PhantomJS can perform the javascript based clicking(never used though). You can mind to switch the language from PHP to Python considering this facility.
Upvotes: 1