Skip to content
从零开始写爬虫
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ZeroCrawler Version 0.1.0 Aug 15, 2019
tests
.gitignore
LICENSE Initial commit Jul 17, 2019
README.md
requirements.txt
setup.py

README.md

ZeroCrawler

从零开始写爬虫

安装

从 pypi 安装:

$ pip install ZeroCrawler

源码安装:

$ git clone git@github.com:MeiK2333/ZeroCrawler.git
$ cd ZeroCrawler/
$ pip install .

直接从 GitHub 安装:

$ git install git+https://github.com/MeiK2333/ZeroCrawler.git

使用

>>> from ZeroCrawler import get
>>> resp = get('http://httpbin.org/get')
>>> resp
<Response [200]>
>>> resp.content
'{\n  "args": {}, \n  "headers": {\n    "Host": "httpbin.org"\n  }, \n  "origin": "36.110.78.251, 36.110.78.251", \n  "url": "https://httpbin.org/get"\n}\n'
>>> resp = get('http://httpbin.org/status/404')
>>> resp
<Response [404]>

测试

$ python -m unittest tests/test_*.py
You can’t perform that action at this time.