Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 594 Bytes

File metadata and controls

17 lines (12 loc) · 594 Bytes

NodeJS Crawler Sample

A sample 12306 crawler in NodeJS which:

  1. simulates user interaction (i.e. click)
  2. fetches data in parallel

You don't need to know any APIs about the website.

P.S. to get the selector path of a webpage element (i.e. '#t-list > table > tbody > tr'), use the Inspector in Chrome to select "Copy > Copy Selector".

usage

  1. install (latest) node: https://nodejs.org/
  2. run npm install to install dependencies
  3. run node index.js

puppeteer

API: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md