1

我想点击链接

<a href="javascript: GFESubmitForm('credit-report-quotation-report.do')">› Credit Quotation</a>

使用follow_link()StatefulBrowser 包中的方法或类似方法

使用

browser.follow_link("javascript: GFESubmitForm('credit-report-quotation-report.do')")

导致错误

mechanicalsoup.utils.LinkNotFoundError

任何帮助将非常感激

4

1 回答 1

1

由于MechancialSoup 不支持 JavaScript,如果您知道 JavaScript 在做什么,您可以尝试手动重建请求,或者使用模拟成熟浏览器(因此包括 JavaScript 支持)的工具,例如 Selenium。

此处的 MechanicalSoup 常见问题解答中描述了这些选项。

祝你好运!

于 2019-06-03T16:45:08.943 回答