抓取需要使用 Mechanize 启用 Javascript 的网站美丽汤 (Python)

发布于 2024-09-30 14:18:11 字数 258 浏览 1 评论 0原文

所以..我得到了这个网站,我正在尝试抓取,但据我了解缺乏支持 .js 的机械化,以及需要支持 JavaScript 的浏览器的顽固网站是 不是一个很好的组合...

我正在寻找关于如何做到这一点的想法...

URL: https://members.iracing.com/membersite/login.jsp

So.. i got this site I am tryign to scrape, but as I understand lack of support of
mechanize for .js, and a stuborn site that requires javascript enabled browser is
not a good mix...

I am looking for ideas, on how to do this...

URL : https://members.iracing.com/membersite/login.jsp

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风和你 2024-10-07 14:18:11

根据您需要执行的操作,您可以使用 webkit 解析页面,这将允许您在执行 javascript 后获得最终的 html。然后你可以使用任何像样的 html 解析器(例如 beautifulsoup)来完成剩下的工作。

Depending on what you need to do, you could use webkit to parse the page, which will allow you to get the final html after the javascript has been executed. You could then use any decent html parser, beautifulsoup for example, to do the rest.

酒中人 2024-10-07 14:18:11

对于 JavaScript,我使用 Chickenfoot 来构建简单的网站,并使用 Webkit 更复杂。

With JavaScript I use Chickenfoot for simple websites and Webkit for more complex.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文