Python 的 Mechanize 有 scala 版本吗?
我在 Python 中使用了 mechanize 并取得了巨大成功。不过,我正在努力学习Scala。我有一个 IRC 机器人,我想为其添加一些功能,主要与从我们公司内部网屏幕抓取网页有关。这需要重定向到公司范围的登录页面,然后转到目的地,然后可能必须提交另一次登录。
有谁知道我可以使用 Scala 来获得此类功能吗?
I have used mechanize in Python with great success. However, I am trying to learn Scala. I have an IRC bot that I would like to add some features to, mostly having to do with screen scraping web pages from our corporate intranet. That requires being redirected to a corp-wide login page, then going to the destination, then having to possibly submit another login.
Does anyone know of something that I can use from Scala to get this sort of functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道 Scala 是否有类似功能的成果。在等待相反的答案时,我建议您寻找具有类似功能的 Java 库。
I don't know any Scala effort of similar functionality. Pending answers to the contrary, I advise you to look for Java libraries of similar functionality.
我能想到的最接近的 Java 库是浏览器驱动程序。最知名的是 Selenium 和 WebDriver。后者还提供进程内模式。
由于 Selenium 的 API 并不是那么好用,因此出现了一些带有 DSLish 外观的项目: Selenium DSL 和 Selenium Inspector。
需要注意的是,它们都是面向 Web 应用程序测试的,因此它们可能缺乏适合您的案例的功能。
The closest Java libraries I can think of are browser drivers. The most well-known are Selenium and WebDriver. The latter also offers an in-process mode.
Since Selenium's API isn't all that pleasent to use, a couple of projects sprung-up with DSLish façades: Selenium DSL and Selenium Inspector.
A caveat is that they are all oriented towards testing of web application, so they might be lacking in features that attend your case.