Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed4b05d9b6 | ||
|
|
6f88b1cec6 | ||
|
|
03451fb8ae | ||
|
|
e45c3fd48b | ||
|
|
1153ac8f24 | ||
|
|
c256a045f9 | ||
|
|
98603439cb | ||
|
|
a6ca011202 | ||
|
|
114c2572a4 | ||
|
f64b362603
|
|||
|
2fd7910194
|
|||
|
c2e53072f7
|
|||
|
c2986f3b14
|
|||
|
57854169f4
|
@@ -1,21 +1,5 @@
|
|||||||
blinker==1.7.0
|
# Include all production requirements
|
||||||
Brotli==1.1.0
|
-r requirements.txt
|
||||||
cachetools==5.3.3
|
|
||||||
click==8.1.7
|
# Development requirements
|
||||||
defusedxml==0.7.1
|
pytest>=6.2.1
|
||||||
Flask==3.0.2
|
|
||||||
gevent==24.2.1
|
|
||||||
greenlet==3.0.3
|
|
||||||
iniconfig==2.0.0
|
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.4
|
|
||||||
MarkupSafe==2.1.5
|
|
||||||
packaging==24.0
|
|
||||||
pluggy==1.4.0
|
|
||||||
PySocks==1.7.1
|
|
||||||
pytest==8.1.1
|
|
||||||
stem==1.8.2
|
|
||||||
urllib3==2.2.2
|
|
||||||
Werkzeug==3.0.3
|
|
||||||
zope.event==5.0
|
|
||||||
zope.interface==6.2
|
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
blinker==1.7.0
|
Flask>=1.0.3
|
||||||
Brotli==1.1.0
|
gevent>=1.2.2
|
||||||
cachetools==5.3.3
|
Brotli>=1.0.7
|
||||||
click==8.1.7
|
PySocks>=1.6.8
|
||||||
defusedxml==0.7.1
|
urllib3>=1.24.1
|
||||||
Flask==3.0.2
|
defusedxml>=0.5.0
|
||||||
gevent==24.2.1
|
cachetools>=4.0.0
|
||||||
greenlet==3.0.3
|
stem>=1.8.0
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.4
|
|
||||||
MarkupSafe==2.1.5
|
|
||||||
PySocks==1.7.1
|
|
||||||
stem==1.8.2
|
|
||||||
urllib3==2.2.2
|
|
||||||
Werkzeug==3.0.3
|
|
||||||
zope.event==5.0
|
|
||||||
zope.interface==6.2
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ def error_page(e):
|
|||||||
elif (exc_info()[0] == util.FetchError
|
elif (exc_info()[0] == util.FetchError
|
||||||
and exc_info()[1].code == '404'
|
and exc_info()[1].code == '404'
|
||||||
):
|
):
|
||||||
error_message = ('Error: The page you are looking for isn\'t here. ¯\_(ツ)_/¯')
|
error_message = ('Error: The page you are looking for isn\'t here.')
|
||||||
return flask.render_template('error.html',
|
return flask.render_template('error.html',
|
||||||
error_code=exc_info()[1].code,
|
error_code=exc_info()[1].code,
|
||||||
error_message=error_message,
|
error_message=error_message,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def request_comments(ctoken, replies=False):
|
|||||||
'hl': 'en',
|
'hl': 'en',
|
||||||
'gl': 'US',
|
'gl': 'US',
|
||||||
'clientName': 'MWEB',
|
'clientName': 'MWEB',
|
||||||
'clientVersion': '2.20240328.08.00',
|
'clientVersion': '2.20210804.02.00',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'continuation': ctoken.replace('=', '%3D'),
|
'continuation': ctoken.replace('=', '%3D'),
|
||||||
@@ -78,7 +78,7 @@ def single_comment_ctoken(video_id, comment_id):
|
|||||||
|
|
||||||
def post_process_comments_info(comments_info):
|
def post_process_comments_info(comments_info):
|
||||||
for comment in comments_info['comments']:
|
for comment in comments_info['comments']:
|
||||||
comment['author'] = strip_non_ascii(comment['author'])
|
comment['author'] = strip_non_ascii(comment['author']) if comment.get('author') else ""
|
||||||
comment['author_url'] = concat_or_none(
|
comment['author_url'] = concat_or_none(
|
||||||
'/', comment['author_url'])
|
'/', comment['author_url'])
|
||||||
comment['author_avatar'] = concat_or_none(
|
comment['author_avatar'] = concat_or_none(
|
||||||
@@ -189,10 +189,10 @@ def video_comments(video_id, sort=0, offset=0, lc='', secret_key=''):
|
|||||||
comments_info['error'] += '\n\n' + e.error_message
|
comments_info['error'] += '\n\n' + e.error_message
|
||||||
comments_info['error'] += '\n\nExit node IP address: %s' % e.ip
|
comments_info['error'] += '\n\nExit node IP address: %s' % e.ip
|
||||||
else:
|
else:
|
||||||
comments_info['error'] = 'YouTube blocked the request. IP address: %s' % e.ip
|
comments_info['error'] = 'YouTube blocked the request. Error: %s' % str(e)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
comments_info['error'] = 'YouTube blocked the request. IP address: %s' % e.ip
|
comments_info['error'] = 'YouTube blocked the request. Error: %s' % str(e)
|
||||||
|
|
||||||
if comments_info.get('error'):
|
if comments_info.get('error'):
|
||||||
print('Error retrieving comments for ' + str(video_id) + ':\n' +
|
print('Error retrieving comments for ' + str(video_id) + ':\n' +
|
||||||
|
|||||||
@@ -11,17 +11,10 @@ import subprocess
|
|||||||
def app_version():
|
def app_version():
|
||||||
def minimal_env_cmd(cmd):
|
def minimal_env_cmd(cmd):
|
||||||
# make minimal environment
|
# make minimal environment
|
||||||
env = {}
|
env = {k: os.environ[k] for k in ['SYSTEMROOT', 'PATH'] if k in os.environ}
|
||||||
for k in ['SYSTEMROOT', 'PATH']:
|
env.update({'LANGUAGE': 'C', 'LANG': 'C', 'LC_ALL': 'C'})
|
||||||
v = os.environ.get(k)
|
|
||||||
if v is not None:
|
|
||||||
env[k] = v
|
|
||||||
|
|
||||||
env['LANGUAGE'] = 'C'
|
out = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
|
||||||
env['LANG'] = 'C'
|
|
||||||
env['LC_ALL'] = 'C'
|
|
||||||
out = subprocess.Popen(
|
|
||||||
cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
subst_list = {
|
subst_list = {
|
||||||
@@ -31,24 +24,21 @@ def app_version():
|
|||||||
}
|
}
|
||||||
|
|
||||||
if os.system("command -v git > /dev/null 2>&1") != 0:
|
if os.system("command -v git > /dev/null 2>&1") != 0:
|
||||||
subst_list
|
return subst_list
|
||||||
else:
|
|
||||||
if call(["git", "branch"], stderr=STDOUT,
|
if call(["git", "branch"], stderr=STDOUT, stdout=open(os.devnull, 'w')) != 0:
|
||||||
stdout=open(os.devnull, 'w')) != 0:
|
return subst_list
|
||||||
subst_list
|
|
||||||
else:
|
describe = minimal_env_cmd(["git", "describe", "--tags", "--always"])
|
||||||
# version
|
|
||||||
describe = minimal_env_cmd(["git", "describe", "--always"])
|
|
||||||
git_revision = describe.strip().decode('ascii')
|
git_revision = describe.strip().decode('ascii')
|
||||||
# branch
|
|
||||||
branch = minimal_env_cmd(["git", "branch"])
|
branch = minimal_env_cmd(["git", "branch"])
|
||||||
git_branch = branch.strip().decode('ascii').replace('* ', '')
|
git_branch = branch.strip().decode('ascii').replace('* ', '')
|
||||||
|
|
||||||
subst_list = {
|
subst_list.update({
|
||||||
"version": __version__,
|
|
||||||
"branch": git_branch,
|
"branch": git_branch,
|
||||||
"commit": git_revision
|
"commit": git_revision
|
||||||
}
|
})
|
||||||
|
|
||||||
return subst_list
|
return subst_list
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,29 @@
|
|||||||
// TODO: Call abort to cancel in-progress appends?
|
// TODO: Call abort to cancel in-progress appends?
|
||||||
|
|
||||||
|
|
||||||
|
// Buffer sizes for different systems
|
||||||
|
const BUFFER_CONFIG = {
|
||||||
|
default: 50 * 10**6, // 50 megabytes
|
||||||
|
webOS: 20 * 10**6, // 20 megabytes WebOS (LG)
|
||||||
|
samsungTizen: 20 * 10**6, // 20 megabytes Samsung Tizen OS
|
||||||
|
androidTV: 30 * 10**6, // 30 megabytes Android TV
|
||||||
|
desktop: 50 * 10**6, // 50 megabytes PC/Mac
|
||||||
|
};
|
||||||
|
|
||||||
|
function detectSystem() {
|
||||||
|
const userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
if (/webos|lg browser/i.test(userAgent)) {
|
||||||
|
return "webOS";
|
||||||
|
} else if (/tizen/i.test(userAgent)) {
|
||||||
|
return "samsungTizen";
|
||||||
|
} else if (/android tv|smart-tv/i.test(userAgent)) {
|
||||||
|
return "androidTV";
|
||||||
|
} else if (/firefox|chrome|safari|edge/i.test(userAgent)) {
|
||||||
|
return "desktop";
|
||||||
|
} else {
|
||||||
|
return "default";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function AVMerge(video, srcInfo, startTime){
|
function AVMerge(video, srcInfo, startTime){
|
||||||
this.audioSource = null;
|
this.audioSource = null;
|
||||||
@@ -164,6 +187,8 @@ AVMerge.prototype.printDebuggingInfo = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Stream(avMerge, source, startTime, avRatio) {
|
function Stream(avMerge, source, startTime, avRatio) {
|
||||||
|
const selectedSystem = detectSystem();
|
||||||
|
let baseBufferTarget = BUFFER_CONFIG[selectedSystem] || BUFFER_CONFIG.default;
|
||||||
this.avMerge = avMerge;
|
this.avMerge = avMerge;
|
||||||
this.video = avMerge.video;
|
this.video = avMerge.video;
|
||||||
this.url = source['url'];
|
this.url = source['url'];
|
||||||
@@ -173,10 +198,11 @@ function Stream(avMerge, source, startTime, avRatio) {
|
|||||||
this.mimeCodec = source['mime_codec']
|
this.mimeCodec = source['mime_codec']
|
||||||
this.streamType = source['acodec'] ? 'audio' : 'video';
|
this.streamType = source['acodec'] ? 'audio' : 'video';
|
||||||
if (this.streamType == 'audio') {
|
if (this.streamType == 'audio') {
|
||||||
this.bufferTarget = avRatio*50*10**6;
|
this.bufferTarget = avRatio * baseBufferTarget;
|
||||||
} else {
|
} else {
|
||||||
this.bufferTarget = 50*10**6; // 50 megabytes
|
this.bufferTarget = baseBufferTarget;
|
||||||
}
|
}
|
||||||
|
console.info(`Detected system: ${selectedSystem}. Applying bufferTarget of ${this.bufferTarget} bytes to ${this.streamType}.`);
|
||||||
|
|
||||||
this.initRange = source['init_range'];
|
this.initRange = source['init_range'];
|
||||||
this.indexRange = source['index_range'];
|
this.indexRange = source['index_range'];
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const player = new Plyr(document.getElementById('js-video-player'), {
|
const playerOptions = {
|
||||||
// Learning about autoplay permission https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/autoplay#syntax
|
// Learning about autoplay permission https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/autoplay#syntax
|
||||||
autoplay: autoplayActive,
|
autoplay: autoplayActive,
|
||||||
disableContextMenu: false,
|
disableContextMenu: false,
|
||||||
@@ -117,5 +117,20 @@
|
|||||||
tooltips: {
|
tooltips: {
|
||||||
controls: true,
|
controls: true,
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const player = new Plyr(document.getElementById('js-video-player'), playerOptions);
|
||||||
|
|
||||||
|
// disable double click to fullscreen
|
||||||
|
// https://github.com/sampotts/plyr/issues/1370#issuecomment-528966795
|
||||||
|
player.eventListeners.forEach(function(eventListener) {
|
||||||
|
if(eventListener.type === 'dblclick') {
|
||||||
|
eventListener.element.removeEventListener(eventListener.type, eventListener.callback, eventListener.options);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add .started property, true after the playback has been started
|
||||||
|
// Needed so controls won't be hidden before playback has started
|
||||||
|
player.started = false;
|
||||||
|
player.once('playing', function(){this.started = true});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ function changeQuality(selection) {
|
|||||||
let videoPaused = video.paused;
|
let videoPaused = video.paused;
|
||||||
let videoSpeed = video.playbackRate;
|
let videoSpeed = video.playbackRate;
|
||||||
let srcInfo;
|
let srcInfo;
|
||||||
if (avMerge)
|
if (avMerge && typeof avMerge.close === 'function') {
|
||||||
avMerge.close();
|
avMerge.close();
|
||||||
|
}
|
||||||
if (selection.type == 'uni'){
|
if (selection.type == 'uni'){
|
||||||
srcInfo = data['uni_sources'][selection.index];
|
srcInfo = data['uni_sources'][selection.index];
|
||||||
video.src = srcInfo.url;
|
video.src = srcInfo.url;
|
||||||
|
|||||||
@@ -37,3 +37,41 @@ e.g. Firefox playback speed options */
|
|||||||
max-height: 320px;
|
max-height: 320px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Custom styles similar to youtube
|
||||||
|
*/
|
||||||
|
.plyr__controls {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__progress__container {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item.plyr__volume {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__controls .plyr__controls__item.plyr__progress__container {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plyr__progress input[type="range"] {
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* End custom styles
|
||||||
|
*/
|
||||||
|
|||||||
@@ -128,6 +128,29 @@ header {
|
|||||||
background-color: var(--buttom-hover);
|
background-color: var(--buttom-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.live-url-choices {
|
||||||
|
background-color: var(--thumb-background);
|
||||||
|
margin: 1rem 0;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playability-error {
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 30vh;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playability-error > span {
|
||||||
|
display: flex;
|
||||||
|
background-color: var(--thumb-background);
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.playlist {
|
.playlist {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 4px;
|
grid-gap: 4px;
|
||||||
@@ -622,6 +645,9 @@ figure.sc-video {
|
|||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
.playability-error {
|
||||||
|
height: 60vh;
|
||||||
|
}
|
||||||
.playlist {
|
.playlist {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 1px;
|
grid-gap: 1px;
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None,
|
|||||||
cleanup_func(response) # release_connection for urllib3
|
cleanup_func(response) # release_connection for urllib3
|
||||||
content = decode_content(
|
content = decode_content(
|
||||||
content,
|
content,
|
||||||
response.getheader('Content-Encoding', default='identity'))
|
response.headers.get('Content-Encoding', default='identity'))
|
||||||
|
|
||||||
if (settings.debugging_save_responses
|
if (settings.debugging_save_responses
|
||||||
and debug_name is not None
|
and debug_name is not None
|
||||||
@@ -840,6 +840,8 @@ def call_youtube_api(client, api, data):
|
|||||||
|
|
||||||
def strip_non_ascii(string):
|
def strip_non_ascii(string):
|
||||||
''' Returns the string without non ASCII characters'''
|
''' Returns the string without non ASCII characters'''
|
||||||
|
if string is None:
|
||||||
|
return ""
|
||||||
stripped = (c for c in string if 0 < ord(c) < 127)
|
stripped = (c for c in string if 0 < ord(c) < 127)
|
||||||
return ''.join(stripped)
|
return ''.join(stripped)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '0.2.20'
|
__version__ = 'v0.3.2'
|
||||||
|
|||||||
@@ -367,32 +367,42 @@ def fetch_watch_page_info(video_id, playlist_id, index):
|
|||||||
watch_page = watch_page.decode('utf-8')
|
watch_page = watch_page.decode('utf-8')
|
||||||
return yt_data_extract.extract_watch_info_from_html(watch_page)
|
return yt_data_extract.extract_watch_info_from_html(watch_page)
|
||||||
|
|
||||||
|
|
||||||
def extract_info(video_id, use_invidious, playlist_id=None, index=None):
|
def extract_info(video_id, use_invidious, playlist_id=None, index=None):
|
||||||
|
primary_client = 'android_vr'
|
||||||
|
fallback_client = 'ios'
|
||||||
|
last_resort_client = 'tv_embedded'
|
||||||
|
|
||||||
tasks = (
|
tasks = (
|
||||||
# Get video metadata from here
|
# Get video metadata from here
|
||||||
gevent.spawn(fetch_watch_page_info, video_id, playlist_id, index),
|
gevent.spawn(fetch_watch_page_info, video_id, playlist_id, index),
|
||||||
gevent.spawn(fetch_player_response, 'android_vr', video_id)
|
gevent.spawn(fetch_player_response, primary_client, video_id)
|
||||||
)
|
)
|
||||||
gevent.joinall(tasks)
|
gevent.joinall(tasks)
|
||||||
util.check_gevent_exceptions(*tasks)
|
util.check_gevent_exceptions(*tasks)
|
||||||
info, player_response = tasks[0].value, tasks[1].value
|
|
||||||
|
info = tasks[0].value or {}
|
||||||
|
player_response = tasks[1].value or {}
|
||||||
|
|
||||||
yt_data_extract.update_with_new_urls(info, player_response)
|
yt_data_extract.update_with_new_urls(info, player_response)
|
||||||
|
|
||||||
# Age restricted video, retry
|
# Fallback to 'ios' if no valid URLs are found
|
||||||
if info['age_restricted'] or info['player_urls_missing']:
|
if not info.get('formats') or info.get('player_urls_missing'):
|
||||||
if info['age_restricted']:
|
print(f"No URLs found in '{primary_client}', attempting with '{fallback_client}'.")
|
||||||
print('Age restricted video, retrying')
|
player_response = fetch_player_response(fallback_client, video_id) or {}
|
||||||
else:
|
yt_data_extract.update_with_new_urls(info, player_response)
|
||||||
print('Player urls missing, retrying')
|
|
||||||
player_response = fetch_player_response('tv_embedded', video_id)
|
# Final attempt with 'tv_embedded' if there are still no URLs
|
||||||
|
if not info.get('formats') or info.get('player_urls_missing'):
|
||||||
|
print(f"No URLs found in '{fallback_client}', attempting with '{last_resort_client}'")
|
||||||
|
player_response = fetch_player_response(last_resort_client, video_id) or {}
|
||||||
yt_data_extract.update_with_new_urls(info, player_response)
|
yt_data_extract.update_with_new_urls(info, player_response)
|
||||||
|
|
||||||
# signature decryption
|
# signature decryption
|
||||||
|
if info.get('formats'):
|
||||||
decryption_error = decrypt_signatures(info, video_id)
|
decryption_error = decrypt_signatures(info, video_id)
|
||||||
if decryption_error:
|
if decryption_error:
|
||||||
decryption_error = 'Error decrypting url signatures: ' + decryption_error
|
info['playability_error'] = 'Error decrypting url signatures: ' + decryption_error
|
||||||
info['playability_error'] = decryption_error
|
|
||||||
|
|
||||||
# check if urls ready (non-live format) in former livestream
|
# check if urls ready (non-live format) in former livestream
|
||||||
# urls not ready if all of them have no filesize
|
# urls not ready if all of them have no filesize
|
||||||
@@ -406,20 +416,20 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
|
|||||||
|
|
||||||
# livestream urls
|
# livestream urls
|
||||||
# sometimes only the livestream urls work soon after the livestream is over
|
# sometimes only the livestream urls work soon after the livestream is over
|
||||||
if (info['hls_manifest_url']
|
info['hls_formats'] = []
|
||||||
and (info['live'] or not info['formats'] or not info['urls_ready'])
|
if info.get('hls_manifest_url') and (info.get('live') or not info.get('formats') or not info['urls_ready']):
|
||||||
):
|
try:
|
||||||
manifest = util.fetch_url(info['hls_manifest_url'],
|
manifest = util.fetch_url(info['hls_manifest_url'],
|
||||||
debug_name='hls_manifest.m3u8',
|
debug_name='hls_manifest.m3u8',
|
||||||
report_text='Fetched hls manifest'
|
report_text='Fetched hls manifest'
|
||||||
).decode('utf-8')
|
).decode('utf-8')
|
||||||
|
|
||||||
info['hls_formats'], err = yt_data_extract.extract_hls_formats(manifest)
|
info['hls_formats'], err = yt_data_extract.extract_hls_formats(manifest)
|
||||||
if not err:
|
if not err:
|
||||||
info['playability_error'] = None
|
info['playability_error'] = None
|
||||||
for fmt in info['hls_formats']:
|
for fmt in info['hls_formats']:
|
||||||
fmt['video_quality'] = video_quality_string(fmt)
|
fmt['video_quality'] = video_quality_string(fmt)
|
||||||
else:
|
except Exception as e:
|
||||||
|
print(f"Error obteniendo HLS manifest: {e}")
|
||||||
info['hls_formats'] = []
|
info['hls_formats'] = []
|
||||||
|
|
||||||
# check for 403. Unnecessary for tor video routing b/c ip address is same
|
# check for 403. Unnecessary for tor video routing b/c ip address is same
|
||||||
|
|||||||
Reference in New Issue
Block a user