Giter Club home page Giter Club logo

12306traincrawler's Introduction

12306全国火车车次爬虫介绍

12306有预售30天的车票,所以每一次都能获取最近30天的车次数据
可以获取到车次的详情数据,包括停车站,停车时间以及停车顺序等
可定时抓取,每日更新数据 基于webmagic实现

运行

  1. 初始化需要获取所有车站站点编码数据,在/images/station_code.csv 需导入数据库
  2. /src/com/crawler/train/Train12306Page 类为获取最近30天全国车次数据,简略数据仅仅包含车次号,出发站和终点站以及时间
  3. /src/com/crawler/train/TrainDetail12306Page 为根据第二步获取的简略数据进一步获取车次的详细数据,因数据量大会有失败的情况,需要重试抓取

数据展示

1 车站编码数据
image

2 车次简略数据
image

3 车次详细数据
image

12306traincrawler's People

Contributors

casolxia 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.