Skip to content

Commit

Permalink
fix: add html5 param to fetching of VideoInfoPage (#924)
Browse files Browse the repository at this point in the history
* fix: fix age restricted video test

* fix:: add html5=1 param for fetching VideoInfoPage
  • Loading branch information
vaaski authored May 27, 2021
1 parent b2df83c commit 4c3a8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ const getVideoInfoPage = async(id, options) => {
url.searchParams.set('ps', 'default');
url.searchParams.set('gl', 'US');
url.searchParams.set('hl', options.lang || 'en');
url.searchParams.set('html5', '1');
const body = await utils.exposedMiniget(url.toString(), options).text();
let info = querystring.parse(body);
info.player_response = findPlayerResponse('get_video_info', info);
Expand Down
2 changes: 1 addition & 1 deletion test/irl-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ytdl = require('..');

const videos = {
'Regular video': 'mgOS64BF2eU',
'Age restricted': 'LuZu9N53Vd0',
'Age restricted': 'Zc09khxyXfA',
'Embed domain restricted': 'B3eAMGXFw1o',
'No embed allowed': 'GFg8BP01F5Q',
Offensive: 'hCKDsjLt_qU',
Expand Down

0 comments on commit 4c3a8bd

Please sign in to comment.