aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-07-20 03:40:35 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-07-20 03:46:06 +0530
commitcca80fe6110653582e8c8a8d06490b4028ffd755 (patch)
tree1ec2f94aecdd44e77108371d655e17dc51a10449 /yt_dlp/YoutubeDL.py
parentc634ad2a3c0bd4bee1535752f9c6cf91aed80a51 (diff)
[youtube] Extract even more thumbnails and reduce testing
* Also fix bug where `_test_url` was being ignored Ref: https://stackoverflow.com/a/20542029 Related: #340
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index d4d1af4fd..3ed104e0f 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1949,12 +1949,15 @@ class YoutubeDL(object):
def thumbnail_tester():
if self.params.get('check_formats'):
- def to_screen(msg):
- return self.to_screen(f'[info] {msg}')
+ test_all = True
+ to_screen = lambda msg: self.to_screen(f'[info] {msg}')
else:
+ test_all = False
to_screen = self.write_debug
def test_thumbnail(t):
+ if not test_all and not t.get('_test_url'):
+ return True
to_screen('Testing thumbnail %s' % t['id'])
try:
self.urlopen(HEADRequest(t['url']))