Git Product home page Git Product logo

kaoyan's Introduction

考研信息查询脚本

自动抓取研招网上的招生信息 使用的第三方库:urllib3,lxml kaoyan.py使用示例

import kaoyan
from multiprocessing.pool import ThreadPool
all = kaoyan.getSchoolList(subject="0839",stype="全日制")
details = kaoyan.getSchoolMajorList(all[1][4])
details_with_subjs = kaoyan.getSchoolMajorList(all[2][4],get_subj=True)
# 获取学校列表后进行并发请求。建议并发时指定输出,直接使用getSchoolMajorList的返回值可导致详细信息和学校不对应
pool = ThreadPool()
fps = []
for each in all:
    fp = open(each[0],"w")
    pool.apply_async(kaoyan.getSchoolMajorList(each[4],False,fp))
    fps.append(fp)
for fp in fps:
    fp.close()

使用main.py:直接运行脚本,或使用py_compile,pyinstaller编译后运行

欢迎提出意见与建议

kaoyan's People

Contributors

remaker01 avatar

Stargazers

Lien avatar  avatar

Watchers

 avatar

kaoyan's Issues

666

理论联系实际

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.