Skip to content

Commit

Permalink
build: update youtube-dl (#152)
Browse files Browse the repository at this point in the history
* build: update youtube-dl

* test: remove unreachable link
  • Loading branch information
Kikobeats committed Jan 25, 2019
1 parent 1caa6d8 commit e53be2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/metascraper-media-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"memoize-token": "~1.1.3",
"p-reflect": "~1.0.0",
"tunnel": "0.0.6",
"youtube-dl": "~1.12.2"
"@microlink/youtube-dl": "~1.13.0"
},
"devDependencies": {
"browserless": "latest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const youtubedl = require('youtube-dl')
const youtubedl = require('@microlink/youtube-dl')
const { promisify } = require('util')
const { noop } = require('lodash')

Expand All @@ -23,8 +23,7 @@ module.exports = ({ cacheDir, onError = noop } = {}) => {
url,
isTwitterUrl(url) && PROXY_URL
? [...opts, `--proxy=${PROXY_URL}`]
: opts,
{ maxBuffer: Infinity }
: opts
)
} catch (err) {
onError(err, url)
Expand Down
10 changes: 2 additions & 8 deletions packages/metascraper-media-provider/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ describe('metascraper-media-provider', () => {
})

describe('youtube', () => {
;[
'https://www.youtube.com/watch?v=gABW21GkFw8',
'https://www.youtube.com/watch?v=hwMkbaS_M_c'
].forEach(url => {
;['https://www.youtube.com/watch?v=hwMkbaS_M_c'].forEach(url => {
it(url, async () => {
const metadata = await metascraper({ url })
console.log(metadata.video)
Expand Down Expand Up @@ -113,10 +110,7 @@ describe('metascraper-media-provider', () => {

describe('audio', () => {
describe('youtube', () => {
;[
'https://www.youtube.com/watch?v=gABW21GkFw8',
'https://www.youtube.com/watch?v=hwMkbaS_M_c'
].forEach(url => {
;['https://www.youtube.com/watch?v=hwMkbaS_M_c'].forEach(url => {
it(url, async () => {
const metadata = await metascraper({ url })
console.log(metadata.audio)
Expand Down

0 comments on commit e53be2f

Please sign in to comment.