2024-10-01 09:17:50 发布
网友
我可以成功地登录并浏览一个网站,但是当我检查注销按钮时,它就像是javascript:__doPostBack('ctl00$lnkBtnLogout','')作为链接,follow_link()不起作用(说:没有适配器)???有人能帮我吗?在
javascript:__doPostBack('ctl00$lnkBtnLogout','')
follow_link()
来自https://github.com/MechanicalSoup/MechanicalSoup:
A Python library for automating interaction with websites. MechanicalSoup automatically stores and sends cookies, follows redirects, and can follow links and submit forms. It doesn't do JavaScript.
这给了你两个选择。在
阅读JavaScript。逆向工程。在Python中重新实现它。找出页面中哪些数据是动态的,哪些是算法所需的。使用MechanicalSoup提取它并将其插入到重新实现中。在
使用支持JavaScript的东西(比如Selenium或PhantomJS)。在
来自https://github.com/MechanicalSoup/MechanicalSoup:
这给了你两个选择。在
自己做JavaScript
阅读JavaScript。逆向工程。在Python中重新实现它。找出页面中哪些数据是动态的,哪些是算法所需的。使用MechanicalSoup提取它并将其插入到重新实现中。在
不要使用机械组
使用支持JavaScript的东西(比如Selenium或PhantomJS)。在
相关问题 更多 >
编程相关推荐