Skip to content

Instantly share code, notes, and snippets.

@mrxf
Created July 28, 2017 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrxf/b80f2e053f9d8e955f7eab2e1699291e to your computer and use it in GitHub Desktop.
Save mrxf/b80f2e053f9d8e955f7eab2e1699291e to your computer and use it in GitHub Desktop.
获取medium中的音频media
const request = require('request')
const cheerio = require('cheerio')
const url = 'https://medium.com/@leighalexander/the-underground-world-of-magical-resistance-on-the-internet-6c854e567347';
const audioUrl = /https:\/\/cdn-audio.*m4a/g;
const reqOpt = {
url: url
}
request(reqOpt, (error, res, body) => {
console.log(body.match(audioUrl))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment