简单,强大和蟒蛇网页搜索结果爬虫。

pageflow的Python项目详细描述


页面流

pageflow是用于网页搜索结果爬虫的python(2和3)库。 它提供了一个简单的api并支持google、baidu、bing等搜索引擎。 [https://pypi.org/project/pageflow/]

功能

  • 支持页面参数,而不仅仅是第一个页面结果。
  • 支持重定向页面信息提取。

安装

一。使用pip

pip install pageflow

2.使用setup.py

git clone https://github.com/Lapis-Hong/PageFlow.git 
cd PageFlow
pip setup.py install

用法

frompageflowimportPageFlowquery="python"pages=1# search results total pagespf=PageFlow("baidu",proxies=None)# Get search page html.html=pf.get_html(query=query,pages=pages)# The following results are all generator of SearchResult obj.# Get search result urls.url=pf.get_url(query=query,pages=pages)# Get search result titles.title=pf.get_title(query=query,pages=pages)# Get search result abstract.abstract=pf.get_abstract(query=query,pages=pages)# Get search result redirect html.redirect_html=pf.get_redirect_html(query=query,pages=pages)# Get search result redirect content.redirect_content=pf.get_redirect_content(query=query,pages=pages)# Get search result title, abstract and url.result=pf.get(query=query,pages=pages)# Get search result title, abstract, url, redirect html and redirect content.result_all=pf.get_all(query=query,pages=pages)

参考文献

https://github.com/howie6879/magic_googlehttps://github.com/meibenjin/GoogleSearchCrawlerhttps://github.com/chrislinan/cx-extractor-python

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用JNA创建同一库的多个实例?   java在将Graphql查询作为JSON字符串传递时收到意外的令牌错误   OAuth2 oltu的java问题   java桌面应用程序使用的好的嵌入式数据库是什么?   java Firebase数据库高级查询选项   java正在使磁盘上的EhCache元素过期   java 安卓还原处于backstack中的片段的实例状态   XMemcached中的java异步集   java TimescaleDB是否使用与Postgresql完全相同的JDBC驱动程序?   java从网站c读取信息#   检查java Android中的字符串是否只包含数字和空格   c#如何向web服务发送特殊字符?   grails无法调用需要java的方法。lang.类参数?   java我在组合框中调用的方法不会运行所有代码,它只运行部分代码   java发送带有标头的HTTP GET请求