Skip to content

Commit

Permalink
4.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed Jun 25, 2021
1 parent deb7410 commit e13c2a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const getWatchJSONPage = async(id, options) => {
let cookie = reqOptions.headers.Cookie || reqOptions.headers.cookie;
reqOptions.headers = Object.assign({
'x-youtube-client-name': '1',
'x-youtube-client-version': '2.20201203.06.00',
'x-youtube-client-version': cver,
'x-youtube-identity-token': exports.cookieCache.get(cookie || 'browser') || '',
}, reqOptions.headers);

Expand Down Expand Up @@ -311,12 +311,12 @@ const getWatchHTMLPage = async(id, options) => {
try {
cver = utils.between(body, '{"key":"cver","value":"', '"}');
info.player_response = findJSON('watch.html', 'player_response',
body, /\bytInitialPlayerResponse\s*=\s*\{/i, '\n', '{');
body, /\bytInitialPlayerResponse\s*=\s*\{/i, '</script>', '{');
} catch (err) {
let args = findJSON('watch.html', 'player_response', body, /\bytplayer\.config\s*=\s*{/, '</script>', '{');
info.player_response = findPlayerResponse('watch.html', args);
}
info.response = findJSON('watch.html', 'response', body, /\bytInitialData("\])?\s*=\s*\{/i, '\n', '{');
info.response = findJSON('watch.html', 'response', body, /\bytInitialData("\])?\s*=\s*\{/i, '</script>', '{');
info.html5player = getHTML5player(body);
return info;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"video",
"download"
],
"version": "0.0.0-development",
"version": "4.8.2",
"repository": {
"type": "git",
"url": "git://github.com/fent/node-ytdl-core.git"
Expand Down

0 comments on commit e13c2a9

Please sign in to comment.