jeudi 5 mars 2015

Using node.js (noodle) to scrape twitch.tv

I am trying to use noodle to scrape the most popular channels from http://ift.tt/1ERNRlH and am running into a problem, I have succesfully used this code with other sites like YouTube but am having no success with twitch:



var query = {
url: 'http://ift.tt/1ERNRlH',
type: 'html',
selector: '#ember934 > div > div > div.meta > p.title > a',
extract: 'href'
},
uriQuery = encodeURIComponent(JSON.stringify(query)),
request = 'http://ift.tt/1zRHok8' +
uriQuery + '&callback=?';

// Make Ajax request to Noodle server
jQuery.getJSON(request, function (data) {
alert(data[0].results);
});


I am receiving the following output:



alert: []


Any suggestions?





Aucun commentaire:

Enregistrer un commentaire