鍍金池/ 問答/數(shù)據(jù)庫  HTML/ 服務(wù)端怎樣用nodejs去爬取jsonp接口的數(shù)據(jù),求解答!!

服務(wù)端怎樣用nodejs去爬取jsonp接口的數(shù)據(jù),求解答??!

接口如下:
http://songsearch.kugou.com/s...

這是一個會返回jsonp數(shù)據(jù)的接口,我現(xiàn)在想用nodejs去爬取這個接口的數(shù)據(jù),試過request、axios等等都不行啊。。
注意是要在node端爬取,而不是在客戶端爬取。。
求解答。。有詳細(xì)步驟最好。。

回答
編輯回答
毀了心
http.get({
        hostname: 'songsearch.kugou.com',
        path: `/song_search_v2?callback=jQuery1124022791447453507696_1520336519789&keyword=${encodeURIComponent('彈指 一揮間')}&page=1&pagesize=30&userid=-1&clientver=&platform=WebFilter&tag=em&filter=2&iscorrection=1&privilege_filter=0&_=1520336519815`,
        headers: {
            'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'
        }
    },
    res => {
        res.on('data', data => {
            console.log(data.toString())
        })
    }
)
2017年4月5日 13:56