Skip to content
/ Ke Public
forked from luofeifei1/Ke

pip安装的贝壳网爬虫API,一行代码将指定筛选条件的全量数据保存为JSON/csv。

License

Notifications You must be signed in to change notification settings

pualxiao/Ke

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ke

贝壳网爬虫API,一行代码将指定筛选条件的全量数据保存为JSON/csv。

安装

pip install ke

入门

请打开test.ipynb查看入门指南。

租房

from ke import Ke
df = Ke(url='https://bj.zu.ke.com/zufang/dongcheng/rt200600000001rp2rp3rp4/#contentList',
            keyword='北京东城整租').ke_scraper_rent(export='json')

输入待爬取页面和保存文件名称,运行后将指定筛选条件下的爬取结果返回为pandas.DataFrame并保存为JSON文件(请参考全量.json)。也支持保存为'csv'格式或不保存(None)。

About

pip安装的贝壳网爬虫API,一行代码将指定筛选条件的全量数据保存为JSON/csv。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.3%
  • Jupyter Notebook 4.7%