A sample 12306 crawler in NodeJS which:
- simulates user interaction (i.e. click)
- 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".
- install (latest) node: https://nodejs.org/
- run
npm install
to install dependencies - run
node index.js
API: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md