Coder Social home page Coder Social logo

lianjia's Introduction

北京二手房在线数据采集

使用 Python 3.5 的 asyncio + aiohttp

    requirements
    使用Python 3.5及以上版本,建议安装以下依赖包
    ==========
    Python3.5
    requests
    lxml
    tqdm
    pandas
    asyncio
    aiohttp

    parameters
    ==========
    params : str
        筛选条件,具体参数在官网查询
        例如:sf1co21tf1p4p5表示“价格300-500万之间、满五唯一/满二的普通住宅”
    field : dict
        可选区域:东城, 西城, 朝阳, 海淀, 丰台, 石景山,
        通州, 昌平, 大兴, 亦庄开发区, 顺义, 房山, 门头沟,
        平谷, 怀柔, 密云, 延庆, 燕郊
    field_name : str
        区域名称,显示在输出文件名
    header : str
        区域url链接
    page_all : int
        全部页数
    page_info : list
        需要的信息列表,输出文件后,替换为最终Dataframe
    sem : asyncio.Semaphore
        协程锁
    headers : dict
        Http get请求头
    columns : list
        pandas Dataframe字段名称
    new_columns : list
        输出excel文件字段名称
from linkedhome import LinkedHome
home = LinkedHome('haidian') # 初始化区域
home.get_all() # 获取数据
home.clean_data() # 清洗数据
python audit_house_list.py

知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 **大陆许可协议进行许可。

lianjia's People

Contributors

x-xz avatar

Watchers

James Cloos avatar dksjhglo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.