Skip to main content

A python crawler authored by Ken.

Project description

kcrawler

Build Status license

A python crawler authored by Ken.

1. 安装

pip install kcrawler
# or
pip install --index-url https://pypi.org/simple kcrawler

更新:

pip install --upgrade kcrawler

2. 使用

2.1 命令行

2.1.1 指定城市爬取安居客小区房价

kcrawler anjuke --city shenzhen --limit 50

数据保存在当前目录下,格式如下:

anjuke_shenzhen_community_price_20xx-xx-xx.csv

2.1.2 爬取掘金专栏阅读量

kcrawler juejin post --name ken --limit 100

kcrawler juejin post --name ken --limit 100 --url 'https://timeline-merger-ms.juejin.im/v1/get_entry_by_self?src=web&uid=5bd2b8b25188252a784d19d7&device_id=1567748420039&token=eyJhY2Nlc3NfdG9rZW4iOiJTTHVPcVRGQ1BseWdTZHF4IiwicmVmcmVzaF90b2tlbiI6ImJHZkJDVDlWQkZiQUNMdTYiLCJ0b2tlbl90eXBlIjoibWFjIiwiZXhwaXJlX2luIjoyNTkyMDAwfQ%3D%3D&targetUid=5bd2b8b25188252a784d19d7&type=post&limit=20&order=createdAt'

数据保存在当前目录下,name 参数指定的子目录下,如: ./ken

2.1.3 爬取掘金小册销售数据

kcrawler juejin book

数据保存在当前目录下,格式如下:

juejin_books_20xx-xx-xx.xls

Project details


Download files

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

Source Distribution

kcrawler-0.1.0.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

kcrawler-0.1.0-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

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