Created
June 20, 2017 09:40
-
-
Save DuckThom/34902b83f4ef3ef79cc56c297a475aee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const request = require('request'); | |
| const cheerio = require('cheerio'); | |
| let url = process.argv[2]; | |
| console.log("Loading current Apple order status...\n\n"); | |
| request(url, function (error, response, body) { | |
| if (error) { | |
| throw error; | |
| } | |
| var $ = cheerio.load(body); | |
| $('.sb-heading > h3 > span:first-child').filter(function() { | |
| var data = $(this); | |
| console.log("Status: " + data.first().text() + " @ " + (new Date)); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "dependencies": { | |
| "cheerio": "^1.0.0-rc.1", | |
| "request": "^2.81.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment