问题描述
我最近想将使用mechanize.Browser
的刮板移植到Python3.我没有找到任何python3-mechanize
软件包或类似的东西.我还不熟悉带有一些特殊过程的Python模块构建,因此我不知道该如何在其中使用2to3
.有什么建议吗?
I recently wanted to port my scraper that uses mechanize.Browser
to Python 3. I haven't found any python3-mechanize
package or anything like that. I'm not yet familiar with Python module building with some special procedures so I don't know how would I use 2to3
there. Any suggestions?
@edit:我接受Sibi的答案,因为它是目前最好的答案.如果它能指出更好的解决方案,我将很高兴以此方式授予其他任何答案.
@edit:I'm accepting Sibi's answer because it is currently the best. I will be pleased to award any other answer this way, if it just points to a better solution.
推荐答案
机械化存储库好几年了.尽管建议使用实验性的Python 3分支,但尚未合并,也没有对支持.
There's been no activity in the Mechanize repository for several years. Despite the experimental Python 3 branch suggested, it has not been merged and there is no official response to the request for support.
如果您正在寻找一个活跃的项目,则不妨寻找其他地方.与Python 3兼容的两个类似项目是
If you're looking for an active project, you may wish to look elsewhere. Two similar projects compatible with Python 3 are
- MechanicalSoup -用于自动与网站进行交互的Python库."
- RoboBrowser -一个简单的Pythonic库,无需独立的Web浏览器即可浏览Web."
- MechanicalSoup - "A Python library for automating interaction with websites."
- RoboBrowser - "a simple, Pythonic library for browsing the web without a standalone web browser."
同时使用Requests和BeautifulSoup.截至2015年中,后者的活动量略有增加.
Both use Requests and BeautifulSoup. As of mid-2015, the latter shows slightly more activity.
这篇关于在Debian上实现Python 3机械化的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!