Showing
1 changed file
with
7 additions
and
3 deletions
1 | -var cheerio = require("cheerio") | 1 | +var cheerio = require('cheerio'); |
2 | -var request = require("request") | 2 | +var request = require('request'); |
3 | 3 | ||
4 | var url="http://www.melcon.com/chart/"; | 4 | var url="http://www.melcon.com/chart/"; |
5 | 5 | ||
6 | request(url, function(error, response, html) | 6 | request(url, function(error, response, html) |
7 | { | 7 | { |
8 | - const $ = cheerio.load(html) | 8 | + var $ = cheerio.load(html); |
9 | + | ||
10 | + var arr=$('.ellipsis rank01'); | ||
11 | + console.log(arr[0].children[0].attribs.title); | ||
9 | 12 | ||
10 | }) | 13 | }) |
14 | + | ... | ... |
-
Please register or login to post a comment