Skip to content

Commit e53be2f

Browse files
authoredJan 25, 2019
build: update youtube-dl (#152)
* build: update youtube-dl * test: remove unreachable link
1 parent 1caa6d8 commit e53be2f

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed
 

‎packages/metascraper-media-provider/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"memoize-token": "~1.1.3",
2525
"p-reflect": "~1.0.0",
2626
"tunnel": "0.0.6",
27-
"youtube-dl": "~1.12.2"
27+
"@microlink/youtube-dl": "~1.13.0"
2828
},
2929
"devDependencies": {
3030
"browserless": "latest",

‎packages/metascraper-media-provider/src/get-media/get-media.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const youtubedl = require('youtube-dl')
3+
const youtubedl = require('@microlink/youtube-dl')
44
const { promisify } = require('util')
55
const { noop } = require('lodash')
66

@@ -23,8 +23,7 @@ module.exports = ({ cacheDir, onError = noop } = {}) => {
2323
url,
2424
isTwitterUrl(url) && PROXY_URL
2525
? [...opts, `--proxy=${PROXY_URL}`]
26-
: opts,
27-
{ maxBuffer: Infinity }
26+
: opts
2827
)
2928
} catch (err) {
3029
onError(err, url)

‎packages/metascraper-media-provider/test/index.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ describe('metascraper-media-provider', () => {
6161
})
6262

6363
describe('youtube', () => {
64-
;[
65-
'https://www.youtube.com/watch?v=gABW21GkFw8',
66-
'https://www.youtube.com/watch?v=hwMkbaS_M_c'
67-
].forEach(url => {
64+
;['https://www.youtube.com/watch?v=hwMkbaS_M_c'].forEach(url => {
6865
it(url, async () => {
6966
const metadata = await metascraper({ url })
7067
console.log(metadata.video)
@@ -113,10 +110,7 @@ describe('metascraper-media-provider', () => {
113110

114111
describe('audio', () => {
115112
describe('youtube', () => {
116-
;[
117-
'https://www.youtube.com/watch?v=gABW21GkFw8',
118-
'https://www.youtube.com/watch?v=hwMkbaS_M_c'
119-
].forEach(url => {
113+
;['https://www.youtube.com/watch?v=hwMkbaS_M_c'].forEach(url => {
120114
it(url, async () => {
121115
const metadata = await metascraper({ url })
122116
console.log(metadata.audio)

0 commit comments

Comments
 (0)