MatthewMueller/cheerio
MatthewMueller/cheerio - a lightweight html parser with jquery like syntax (find, parent, parents, closest, next, nextAll, prev, prevAll, slice, each, map, filter, first, last, eq)
request.get(url, (error, rsp, body) -> songs = [] $ = cheerio.load(body) songs = $('.track_list .song_name > a:first-child').map( -> $(this).attr('href').match(/\d+/)[0] ) console.log('songs', songs) getMetaBySongId(songs[0]) )
沒有留言:
張貼留言