Reputation: 9
I would like to follow the link
<a href="javascript: GFESubmitForm('credit-report-quotation-report.do')">› Credit Quotation</a>
using the follow_link()
method or similar in the StatefulBrowser package
Using
browser.follow_link("javascript: GFESubmitForm('credit-report-quotation-report.do')")
causes erros
mechanicalsoup.utils.LinkNotFoundError
Any help would be much appreciated
Upvotes: 1
Views: 854
Reputation: 216
Since MechancialSoup doesn't support JavaScript, you can either try to manually reconstruct the request if you know what the JavaScript is doing, or use a tool that simulates a fully-fledged browser (and thus includes JavaScript support) such as Selenium.
These options are described in the MechanicalSoup FAQ here.
Good luck!
Upvotes: 1