Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var request = require('request');
- var cheerio = require('cheerio');
- request('http://www.nasdaq.com/symbol/spy/time-sales', function (error, response, body) {
- if (!error && response.statusCode == 200) {
- var $ = cheerio.load(body);
- var res = [];
- console.log($("#AfterHoursPagingContents_Table").children()[1])
- $($("#AfterHoursPagingContents_Table").children()[1]).children().each(function(i,child){
- console.log(child)
- var data = [$(child.children[0]).text(),$(child.children[1]).text(),$(child.children[2]).text()];
- res.push(data.join(", "))
- })
- console.log(res.join("\n"));
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement