以编程方式登录网站以进行屏幕抓取的最佳方法是什么

以编程方式登录网站以进行屏幕抓取的最佳方法是什么

本文介绍了以编程方式登录网站以进行屏幕抓取的最佳方法是什么?(最好在 Python 中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够以编程方式登录网站并定期从该网站获取一些信息.什么是使这尽可能简单的最佳工具?我更喜欢某种类型的 Python 库,因为我想更精通 Python,但我愿意接受任何建议.

I want to be able to log into a website programmatically and periodically obtain some information from the site. What is the best tool(s) that would make this as simple as possible? I'd prefer a Python library of some type because I want to become more proficient in Python, but I'm open to any suggestions.

推荐答案

你可以试试 Mechanize (http://wwwsearch.sourceforge.net/mechanize/) 用于程序化网络浏览,并且绝对使用 Beautiful Soup (http://www.crummy.com/software/BeautifulSoup/) 用于抓取.

You can try Mechanize (http://wwwsearch.sourceforge.net/mechanize/) for programmatic web-browsing, and definitely use Beautiful Soup (http://www.crummy.com/software/BeautifulSoup/) for the scraping.

这篇关于以编程方式登录网站以进行屏幕抓取的最佳方法是什么?(最好在 Python 中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 15:58