aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-08-02 18:27:27 -0500
committerJesús <heckyel@hyperbola.info>2021-08-02 18:27:27 -0500
commitcb9b6dadbd1c3e268e87cd8eac9097760b3526ab (patch)
tree4a52d0110591d8dc516c16c038936a8300edcca0 /youtube/watch.py
parentf27105fa7f92919ea2cecdc87239e62a2a3d23b7 (diff)
downloadyt-local-cb9b6dadbd1c3e268e87cd8eac9097760b3526ab.tar.lz
yt-local-cb9b6dadbd1c3e268e87cd8eac9097760b3526ab.tar.xz
yt-local-cb9b6dadbd1c3e268e87cd8eac9097760b3526ab.zip
fix check max_resolution in TOR mode
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index 38d08f7..80aa3b7 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -33,7 +33,7 @@ def get_video_sources(info, tor_bypass=False):
for fmt in info['formats']:
if not all(fmt[attr] for attr in ('quality', 'width', 'ext', 'url')):
continue
- if fmt['acodec'] and fmt['vcodec'] and fmt['height'] <= max_resolution:
+ if fmt['acodec'] and fmt['vcodec'] and fmt['width'] <= max_resolution:
video_sources.append({
'src': fmt['url'],
'type': 'video/' + fmt['ext'],