This code is for education purposes only!
The code shown in this gist is copyleft and provided "AS IS".
For serious or Commerical uses of this script with Madura Online, I'd suggest you contact Madura K.
npm install
npm run start
var Xray = require('x-ray') | |
var x = Xray() | |
x('https://maduraonline.com/?find=', '.tb > tr', [ | |
{ | |
entry: 'a', | |
link: 'a@href', | |
results: x('a@href', { | |
nestedResult: x('.tb > tr', [{ | |
type: '.ty', | |
desc: '.td' | |
}]) | |
}) | |
} | |
]) | |
.paginate('body > div > div:nth-child(3) > p:nth-child(3) > a:last-child@href') | |
.write('results.json') |
{ | |
"name": "madura2json", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "copyleft-next-0.3.1", | |
"dependencies": { | |
"x-ray": "^2.3.4" | |
}, | |
"scripts": { | |
"start": "node index.js" | |
} | |
} |