Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Il faut installer le module cheerio
- // npm install cheerio
- cheerio = require('cheerio')
- var headers = {
- 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36',
- 'Content-Type' : 'application/x-www-form-urlencoded'
- }
- var url = "http://www.japanfm.fr/player/refresh_dernier_titre-new2.php"
- request({url:url, headers: headers}, function(error, response, body){
- if (!error){
- var $ = cheerio.load(body)
- console.log($('.div_artiste_player_integ').text())
- client.say("Nom de la chaine", "TwitchLit En cours : " + $('.div_artiste_player_integ').text())
- } else { console.log("Ya un ptit probleme : " + error); }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement