Skip to main content

feapder是一款支持分布式、批次采集、数据防丢、报警丰富的python爬虫框架

Project description

FEAPDER

Downloads Downloads Downloads

简介

  1. feapder是一款上手简单,功能强大的Python爬虫框架,内置AirSpider、Spider、TaskSpider、BatchSpider四种爬虫解决不同场景的需求。
  2. 支持断点续爬、监控报警、浏览器渲染、海量数据去重等功能。
  3. 更有功能强大的爬虫管理系统feaplat为其提供方便的部署及调度

读音: [ˈfiːpdə]

feapder

文档地址

环境要求:

  • Python 3.6.0+
  • Works on Linux, Windows, macOS

安装

From PyPi:

精简版

pip install feapder

浏览器渲染版:

pip install "feapder[render]"

完整版:

pip install "feapder[all]"

三个版本区别:

  1. 精简版:不支持浏览器渲染、不支持基于内存去重、不支持入库mongo
  2. 浏览器渲染版:不支持基于内存去重、不支持入库mongo
  3. 完整版:支持所有功能

完整版可能会安装出错,若安装出错,请参考安装问题

小试一下

创建爬虫

feapder create -s first_spider

创建后的爬虫代码如下:

import feapder


class FirstSpider(feapder.AirSpider):
    def start_requests(self):
        yield feapder.Request("https://www.baidu.com")

    def parse(self, request, response):
        print(response)


if __name__ == "__main__":
    FirstSpider().start()
        

直接运行,打印如下:

Thread-2|2021-02-09 14:55:11,373|request.py|get_response|line:283|DEBUG|
                -------------- FirstSpider.parse request for ----------------
                url  = https://www.baidu.com
                method = GET
                body = {'timeout': 22, 'stream': True, 'verify': False, 'headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36'}}

<Response [200]>
Thread-2|2021-02-09 14:55:11,610|parser_control.py|run|line:415|DEBUG| parser 等待任务...
FirstSpider|2021-02-09 14:55:14,620|air_spider.py|run|line:80|INFO| 无任务,爬虫结束

代码解释如下:

  1. start_requests: 生产任务
  2. parse: 解析数据

参与贡献

贡献之前请先阅读 贡献指南

感谢所有做过贡献的人!

爬虫工具推荐

  1. 爬虫在线工具库:http://www.spidertools.cn
  2. 爬虫管理系统:http://feapder.com/#/feapder_platform/feaplat
  3. 验证码识别库:https://github.com/sml2h3/ddddocr

微信赞赏

如果您觉得这个项目帮助到了您,您可以帮作者买一杯咖啡表示鼓励 🍹

也可和作者交个朋友,解决您在使用过程中遇到的问题

赞赏码

学习交流

知识星球:17321694 作者微信: boris_tm QQ群号:485067374

加好友备注:feapder

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feapder-1.8.9b3.tar.gz (202.7 kB view details)

Uploaded Source

Built Distribution

feapder-1.8.9b3-py3-none-any.whl (218.4 kB view details)

Uploaded Python 3

File details

Details for the file feapder-1.8.9b3.tar.gz.

File metadata

  • Download URL: feapder-1.8.9b3.tar.gz
  • Upload date:
  • Size: 202.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for feapder-1.8.9b3.tar.gz
Algorithm Hash digest
SHA256 629b9f1c3245d7fbebcacd30523cce03cc3da4b2e2643d74c06ab2c5555ecd11
MD5 6c1a70421643c55c6dc9ae6ade518e7f
BLAKE2b-256 9dabaa22dfc2462df6afa3a109b186b2563d34b9d6fee647e6020624aa9037e5

See more details on using hashes here.

File details

Details for the file feapder-1.8.9b3-py3-none-any.whl.

File metadata

  • Download URL: feapder-1.8.9b3-py3-none-any.whl
  • Upload date:
  • Size: 218.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for feapder-1.8.9b3-py3-none-any.whl
Algorithm Hash digest
SHA256 85716e3fcbbbf417f4a8f44990d933684d7df2e0a7f0a8f8f7877016d8f044bd
MD5 cbacb7f00b1bfc21cbe703958a701f77
BLAKE2b-256 edff2a9fcd7f5fb837e2bf58d0c31d127ec9728164145f08dfee8966e64f7f0b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page