]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/generic.py
[cleanup] Misc (#8598)
[yt-dlp.git] / yt_dlp / extractor / generic.py
CommitLineData
9b122384
PH
1import os
2import re
ade1fa70 3import types
14f25df2 4import urllib.parse
f9934b96 5import xml.etree.ElementTree
9b122384 6
8f97a15d 7from .common import InfoExtractor # isort: split
f8271158 8from .commonprotocols import RtmpIE
fc9713a1 9from .youtube import YoutubeIE
14f25df2 10from ..compat import compat_etree_fromstring
8c25f81b 11from ..utils import (
f8271158 12 KNOWN_EXTENSIONS,
ed027fd9 13 MEDIA_EXTENSIONS,
f8271158 14 ExtractorError,
f8271158 15 UnsupportedError,
b759a0d4 16 determine_ext,
93e7c699 17 determine_protocol,
c2d2ee40 18 dict_get,
8e9fe43c 19 extract_basic_auth,
f04b5bed 20 filter_dict,
8f97a15d 21 format_field,
c76eb41b 22 int_or_none,
61ca9a80 23 is_html,
a4a554a7 24 js_to_json,
6cc62232 25 merge_dicts,
63d990d2 26 mimetype2ext,
ed2d6a19 27 orderedSet,
c76eb41b 28 parse_duration,
11c86170 29 parse_resolution,
9d4660ca 30 smuggle_url,
c2d2ee40 31 str_or_none,
4e4982ab 32 traverse_obj,
d6bf1161 33 try_call,
9d4660ca 34 unescapeHTML,
29f7c58a 35 unified_timestamp,
4d54ef20 36 unsmuggle_url,
c2e0fc40 37 update_url_query,
29f7c58a 38 url_or_none,
f9fb3ce8 39 urlhandle_detect_ext,
32a84bcf 40 urljoin,
d5d1df8a 41 variadic,
29f7c58a 42 xpath_attr,
76c73715 43 xpath_text,
c76eb41b 44 xpath_with_ns,
9b122384
PH
45)
46
0838239e 47
9b122384 48class GenericIE(InfoExtractor):
79649588 49 IE_DESC = 'Generic downloader that works on some sites'
9b122384 50 _VALID_URL = r'.*'
79649588 51 IE_NAME = 'generic'
962ffcf8 52 _NETRC_MACHINE = False # Suppress username warning
cfe50f04 53 _TESTS = [
c5fa81fe
S
54 # Direct link to a video
55 {
56 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
57 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
58 'info_dict': {
59 'id': 'trailer',
60 'ext': 'mp4',
61 'title': 'trailer',
62 'upload_date': '20100513',
19c90e40 63 'direct': True,
64 'timestamp': 1273772943.0,
c5fa81fe
S
65 }
66 },
c5138a7c 67 # Direct link to media delivered compressed (until Accept-Encoding is *)
c5fa81fe
S
68 {
69 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
70 'md5': '128c42e68b13950268b648275386fc74',
71 'info_dict': {
72 'id': 'FictionJunction-Parallel_Hearts',
73 'ext': 'flac',
74 'title': 'FictionJunction-Parallel_Hearts',
75 'upload_date': '20140522',
76 },
77 'expected_warnings': [
78 'URL could be a direct video link, returning it as such.'
39efc6e3
YCH
79 ],
80 'skip': 'URL invalid',
c5fa81fe
S
81 },
82 # Direct download with broken HEAD
83 {
84 'url': 'http://ai-radio.org:8000/radio.opus',
85 'info_dict': {
86 'id': 'radio',
87 'ext': 'opus',
88 'title': 'radio',
89 },
90 'params': {
91 'skip_download': True, # infinite live stream
92 },
93 'expected_warnings': [
ef0e4e7b
YCH
94 r'501.*Not Implemented',
95 r'400.*Bad Request',
c5fa81fe
S
96 ],
97 },
98 # Direct link with incorrect MIME type
99 {
100 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
101 'md5': '4ccbebe5f36706d85221f204d7eb5913',
102 'info_dict': {
103 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
104 'id': '5_Lennart_Poettering_-_Systemd',
105 'ext': 'webm',
106 'title': '5_Lennart_Poettering_-_Systemd',
107 'upload_date': '20141120',
19c90e40 108 'direct': True,
109 'timestamp': 1416498816.0,
c5fa81fe
S
110 },
111 'expected_warnings': [
112 'URL could be a direct video link, returning it as such.'
113 ]
114 },
115 # RSS feed
116 {
117 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
118 'info_dict': {
2068a603 119 'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
c5fa81fe
S
120 'title': 'Zero Punctuation',
121 'description': 're:.*groundbreaking video review series.*'
122 },
123 'playlist_mincount': 11,
124 },
125 # RSS feed with enclosure
126 {
127 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
128 'info_dict': {
29f7c58a 129 'id': 'http://podcastfeeds.nbcnews.com/nbcnews/video/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
130 'title': 'MSNBC Rachel Maddow (video)',
131 'description': 're:.*her unique approach to storytelling.*',
132 },
133 'playlist': [{
134 'info_dict': {
135 'ext': 'mov',
136 'id': 'pdv_maddow_netcast_mov-12-03-2020-223726',
137 'title': 'MSNBC Rachel Maddow (video) - 12-03-2020-223726',
138 'description': 're:.*her unique approach to storytelling.*',
139 'upload_date': '20201204',
140 },
141 }],
19c90e40 142 'skip': 'Dead link',
29f7c58a 143 },
144 # RSS feed with item with description and thumbnails
145 {
146 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
147 'info_dict': {
148 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
149 'title': 're:.*100% Hydrogen.*',
150 'description': 're:.*In this episode.*',
151 },
152 'playlist': [{
153 'info_dict': {
154 'ext': 'm4a',
19c90e40 155 'id': '818a5d38-01cd-152f-2231-ee479677fa82',
29f7c58a 156 'title': 're:Hydrogen!',
157 'description': 're:.*In this episode we are going.*',
158 'timestamp': 1567977776,
159 'upload_date': '20190908',
19c90e40 160 'duration': 423,
29f7c58a 161 'thumbnail': r're:^https?://.*\.jpg$',
162 'episode_number': 1,
163 'season_number': 1,
164 'age_limit': 0,
2068a603
B
165 'season': 'Season 1',
166 'direct': True,
167 'episode': 'Episode 1',
29f7c58a 168 },
169 }],
170 'params': {
171 'skip_download': True,
172 },
c5fa81fe 173 },
01aec848
BG
174 # RSS feed with enclosures and unsupported link URLs
175 {
176 'url': 'http://www.hellointernet.fm/podcast?format=rss',
177 'info_dict': {
178 'id': 'http://www.hellointernet.fm/podcast?format=rss',
179 'description': 'CGP Grey and Brady Haran talk about YouTube, life, work, whatever.',
180 'title': 'Hello Internet',
181 },
182 'playlist_mincount': 100,
183 },
2068a603
B
184 # RSS feed with guid
185 {
186 'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
187 'info_dict': {
188 'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
189 'description': 'md5:be809a44b63b0c56fb485caf68685520',
190 'title': 'The Little Red Podcast',
191 },
192 'playlist_mincount': 76,
193 },
8765222d
S
194 # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
195 {
196 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
197 'info_dict': {
198 'id': 'smil',
199 'ext': 'mp4',
200 'title': 'Automatics, robotics and biocybernetics',
201 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
e327b736 202 'upload_date': '20130627',
8765222d
S
203 'formats': 'mincount:16',
204 'subtitles': 'mincount:1',
205 },
206 'params': {
207 'force_generic_extractor': True,
208 'skip_download': True,
209 },
210 },
211 # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
212 {
213 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
214 'info_dict': {
215 'id': 'hds',
216 'ext': 'flv',
217 'title': 'hds',
218 'formats': 'mincount:1',
219 },
220 'params': {
221 'skip_download': True,
222 },
223 },
224 # SMIL from https://www.restudy.dk/video/play/id/1637
225 {
226 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
227 'info_dict': {
228 'id': 'video_1637',
229 'ext': 'flv',
230 'title': 'video_1637',
231 'formats': 'mincount:3',
232 },
233 'params': {
234 'skip_download': True,
235 },
236 },
237 # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
238 {
239 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
240 'info_dict': {
241 'id': 'smil-service',
242 'ext': 'flv',
243 'title': 'smil-service',
244 'formats': 'mincount:1',
245 },
246 'params': {
247 'skip_download': True,
248 },
249 },
250 # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
251 {
252 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
253 'info_dict': {
254 'id': '4719370',
255 'ext': 'mp4',
256 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
257 'formats': 'mincount:3',
258 },
259 'params': {
260 'skip_download': True,
261 },
262 },
1de5cd3b
S
263 # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
264 {
265 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
266 'info_dict': {
267 'id': 'mZlp2ctYIUEB',
268 'ext': 'mp4',
269 'title': 'Tikibad ontruimd wegens brand',
270 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
ec85ded8 271 'thumbnail': r're:^https?://.*\.jpg$',
1de5cd3b
S
272 'duration': 33,
273 },
274 'params': {
275 'skip_download': True,
276 },
19c90e40 277 'skip': '404 Not Found',
1de5cd3b 278 },
9d939cec
S
279 # MPD from http://dash-mse-test.appspot.com/media.html
280 {
281 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
282 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
283 'info_dict': {
284 'id': 'car-20120827-manifest',
285 'ext': 'mp4',
286 'title': 'car-20120827-manifest',
287 'formats': 'mincount:9',
0738187f 288 'upload_date': '20130904',
19c90e40 289 'timestamp': 1378272859.0,
9d939cec 290 },
9d939cec 291 },
20938f76
S
292 # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
293 {
294 'url': 'http://once.unicornmedia.com/now/master/playlist/bb0b18ba-64f5-4b1b-a29f-0ac252f06b68/77a785f3-5188-4806-b788-0893a61634ed/93677179-2d99-4ef4-9e17-fe70d49abfbf/content.m3u8',
295 'info_dict': {
296 'id': 'content',
297 'ext': 'mp4',
298 'title': 'content',
299 'formats': 'mincount:8',
300 },
301 'params': {
302 # m3u8 downloads
303 'skip_download': True,
39efc6e3
YCH
304 },
305 'skip': 'video gone',
20938f76 306 },
edd9b71c
S
307 # m3u8 served with Content-Type: text/plain
308 {
309 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
310 'info_dict': {
311 'id': 'index',
312 'ext': 'mp4',
313 'title': 'index',
314 'upload_date': '20140720',
315 'formats': 'mincount:11',
316 },
317 'params': {
318 # m3u8 downloads
319 'skip_download': True,
39efc6e3
YCH
320 },
321 'skip': 'video gone',
edd9b71c 322 },
c5fa81fe
S
323 # google redirect
324 {
325 'url': 'http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCUQtwIwAA&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcmQHVoWB5FY&ei=F-sNU-LLCaXk4QT52ICQBQ&usg=AFQjCNEw4hL29zgOohLXvpJ-Bdh2bils1Q&bvm=bv.61965928,d.bGE',
326 'info_dict': {
327 'id': 'cmQHVoWB5FY',
328 'ext': 'mp4',
329 'upload_date': '20130224',
19c90e40 330 'uploader_id': '@TheVerge',
ec85ded8 331 'description': r're:^Chris Ziegler takes a look at the\.*',
c5fa81fe
S
332 'uploader': 'The Verge',
333 'title': 'First Firefox OS phones side-by-side',
334 },
335 'params': {
336 'skip_download': False,
337 }
338 },
6c91a5a7
S
339 {
340 # redirect in Refresh HTTP header
341 'url': 'https://www.facebook.com/l.php?u=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpO8h3EaFRdo&h=TAQHsoToz&enc=AZN16h-b6o4Zq9pZkCCdOLNKMN96BbGMNtcFwHSaazus4JHT_MFYkAA-WARTX2kvsCIdlAIyHZjl6d33ILIJU7Jzwk_K3mcenAXoAzBNoZDI_Q7EXGDJnIhrGkLXo_LJ_pAa2Jzbx17UHMd3jAs--6j2zaeto5w9RTn8T_1kKg3fdC5WPX9Dbb18vzH7YFX0eSJmoa6SP114rvlkw6pkS1-T&s=1',
342 'info_dict': {
343 'id': 'pO8h3EaFRdo',
344 'ext': 'mp4',
345 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
346 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
347 'upload_date': '20150917',
348 'uploader_id': 'brtvofficial',
349 'uploader': 'Boiler Room',
350 },
351 'params': {
352 'skip_download': False,
353 },
354 },
cfe50f04 355 {
79649588 356 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
d360a146 357 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
79649588 358 'info_dict': {
d360a146
S
359 'id': '13601338388002',
360 'ext': 'mp4',
79649588
PH
361 'uploader': 'www.hodiho.fr',
362 'title': 'R\u00e9gis plante sa Jeep',
cfe50f04
JMF
363 }
364 },
c19f7764
JMF
365 # bandcamp page with custom domain
366 {
79649588
PH
367 'add_ie': ['Bandcamp'],
368 'url': 'http://bronyrock.com/track/the-pony-mash',
79649588 369 'info_dict': {
fd50bf62
S
370 'id': '3235767654',
371 'ext': 'mp3',
79649588
PH
372 'title': 'The Pony Mash',
373 'uploader': 'M_Pallante',
c19f7764 374 },
79649588 375 'skip': 'There is a limit of 200 free downloads / month for the test song',
c19f7764 376 },
1b86cc41 377 # embed.ly video
378 {
379 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
380 'info_dict': {
381 'id': '9ODmcdjQcHQ',
382 'ext': 'mp4',
0a5bce56
PH
383 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
384 'upload_date': '20140225',
385 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
386 'uploader': 'Tested',
387 'uploader_id': 'testedcom',
1b86cc41 388 },
389 # No need to test YoutubeIE here
390 'params': {
391 'skip_download': True,
392 },
393 },
60cc4dc4
PH
394 # funnyordie embed
395 {
396 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
60cc4dc4
PH
397 'info_dict': {
398 'id': '18e820ec3f',
399 'ext': 'mp4',
400 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
401 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
93d020dd 402 },
39efc6e3
YCH
403 # HEAD requests lead to endless 301, while GET is OK
404 'expected_warnings': ['301'],
60cc4dc4 405 },
93d020dd
S
406 # RUTV embed
407 {
408 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
409 'info_dict': {
410 'id': '776940',
411 'ext': 'mp4',
412 'title': 'Охотское море стало целиком российским',
413 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
414 },
415 'params': {
416 # m3u8 download
417 'skip_download': True,
418 },
aab74fa1 419 },
f37bdbe5
S
420 # TVC embed
421 {
422 'url': 'http://sch1298sz.mskobr.ru/dou_edu/karamel_ki/filial_galleries/video/iframe_src_http_tvc_ru_video_iframe_id_55304_isplay_false_acc_video_id_channel_brand_id_11_show_episodes_episode_id_32307_frameb/',
423 'info_dict': {
424 'id': '55304',
425 'ext': 'mp4',
426 'title': 'Дошкольное воспитание',
427 },
428 },
b827a601
S
429 # SportBox embed
430 {
431 'url': 'http://www.vestifinance.ru/articles/25753',
432 'info_dict': {
433 'id': '25753',
05d1e7aa 434 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
b827a601
S
435 },
436 'playlist': [{
437 'info_dict': {
438 'id': '370908',
439 'title': 'Госзаказ. День 3',
440 'ext': 'mp4',
441 }
442 }, {
443 'info_dict': {
444 'id': '370905',
445 'title': 'Госзаказ. День 2',
446 'ext': 'mp4',
447 }
448 }, {
449 'info_dict': {
450 'id': '370902',
451 'title': 'Госзаказ. День 1',
452 'ext': 'mp4',
453 }
454 }],
455 'params': {
456 # m3u8 download
457 'skip_download': True,
458 },
459 },
bf20b9c5
S
460 # Myvi.ru embed
461 {
462 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
463 'info_dict': {
464 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
465 'ext': 'mp4',
466 'title': 'Ужастики, русский трейлер (2015)',
ec85ded8 467 'thumbnail': r're:^https?://.*\.jpg$',
bf20b9c5 468 'duration': 153,
9751a457 469 },
470 'skip': 'Site dead',
bf20b9c5 471 },
c76799c5
S
472 # XHamster embed
473 {
474 'url': 'http://www.numisc.com/forum/showthread.php?11696-FM15-which-pumiscer-was-this-%28-vid-%29-%28-alfa-as-fuck-srx-%29&s=711f5db534502e22260dec8c5e2d66d8',
475 'info_dict': {
476 'id': 'showthread',
477 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
478 },
479 'playlist_mincount': 7,
39efc6e3
YCH
480 # This forum does not allow <iframe> syntaxes anymore
481 # Now HTML tags are displayed as-is
482 'skip': 'No videos on this page',
c76799c5 483 },
aab74fa1
PH
484 # Embedded TED video
485 {
486 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
a8eb5a8e 487 'md5': '65fdff94098e4a607385a60c5177c638',
aab74fa1 488 'info_dict': {
a8eb5a8e 489 'id': '1969',
aab74fa1 490 'ext': 'mp4',
a8eb5a8e
PH
491 'title': 'Hidden miracles of the natural world',
492 'uploader': 'Louie Schwartzberg',
493 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
aab74fa1 494 }
60cc4dc4 495 },
d95e35d6
S
496 # nowvideo embed hidden behind percent encoding
497 {
498 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
499 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
500 'info_dict': {
501 'id': '06e53103ca9aa',
502 'ext': 'flv',
503 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
504 'description': 'No description',
505 },
0f2a2ba1 506 },
893f8832
PH
507 # arte embed
508 {
509 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
510 'md5': '7653032cbb25bf6c80d80f217055fa43',
511 'info_dict': {
512 'id': '048195-004_PLUS7-F',
513 'ext': 'flv',
514 'title': 'X:enius',
515 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
516 'upload_date': '20140320',
517 },
518 'params': {
519 'skip_download': 'Requires rtmpdump'
39efc6e3
YCH
520 },
521 'skip': 'video gone',
893f8832 522 },
cbd55ade
S
523 # francetv embed
524 {
525 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
526 'info_dict': {
527 'id': 'EV_30231',
528 'ext': 'mp4',
529 'title': 'Alcaline, le concert avec Calogero',
530 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
531 'upload_date': '20150226',
532 'timestamp': 1424989860,
533 'duration': 5400,
534 },
535 'params': {
536 # m3u8 downloads
537 'skip_download': True,
538 },
539 'expected_warnings': [
540 'Forbidden'
541 ]
542 },
fa35cdad
PH
543 # Condé Nast embed
544 {
545 'url': 'http://www.wired.com/2014/04/honda-asimo/',
546 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
547 'info_dict': {
548 'id': '53501be369702d3275860000',
549 'ext': 'mp4',
550 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
551 }
ebd3c7b3
PH
552 },
553 # Dailymotion embed
554 {
555 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
556 'md5': '441aeeb82eb72c422c7f14ec533999cd',
557 'info_dict': {
558 'id': 'k2mm4bCdJ6CQ2i7c8o2',
559 'ext': 'mp4',
560 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
0738187f 561 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
ebd3c7b3 562 'uploader': 'Spi0n',
0738187f
YCH
563 'uploader_id': 'xgditw',
564 'upload_date': '20140425',
565 'timestamp': 1398441542,
ebd3c7b3
PH
566 },
567 'add_ie': ['Dailymotion'],
2b88feed 568 },
71a1db89
S
569 # DailyMail embed
570 {
571 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
572 'info_dict': {
573 'id': '1495629',
574 'ext': 'mp4',
575 'title': 'Care worker punches elderly dementia patient in head 11 times',
576 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
577 },
578 'add_ie': ['DailyMail'],
579 'params': {
580 'skip_download': True,
581 },
582 },
2b88feed
PH
583 # YouTube embed
584 {
585 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
586 'info_dict': {
587 'id': 'FXRb4ykk4S0',
588 'ext': 'mp4',
589 'title': 'The NBL Auction 2014',
590 'uploader': 'BADMINTON England',
591 'uploader_id': 'BADMINTONEvents',
592 'upload_date': '20140603',
593 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
594 },
595 'add_ie': ['Youtube'],
596 'params': {
597 'skip_download': True,
598 }
599 },
a0566bbf 600 # MTVServices embed
c5cd249e 601 {
1fa309da
YCH
602 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
603 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
c5cd249e 604 'info_dict': {
1fa309da 605 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
c5cd249e 606 'ext': 'mp4',
1fa309da
YCH
607 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
608 'description': 'Two valets share their love for movie star Liam Neesons.',
05d1e7aa
YCH
609 'timestamp': 1349922600,
610 'upload_date': '20121011',
c5cd249e
JMF
611 },
612 },
61013473 613 # YouTube embed via <data-embed-url="">
614 {
615 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
61013473 616 'info_dict': {
a8eb5a8e 617 'id': '4vAffPZIT44',
61013473 618 'ext': 'mp4',
a8eb5a8e 619 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
ed2d6a19
PH
620 'uploader': 'Gameloft',
621 'uploader_id': 'gameloft',
a8eb5a8e
PH
622 'upload_date': '20140828',
623 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
ed2d6a19
PH
624 },
625 'params': {
626 'skip_download': True,
61013473 627 }
c8e9a235 628 },
4d805e06
PH
629 # Flowplayer
630 {
631 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
632 'md5': '9d65602bf31c6e20014319c7d07fba27',
633 'info_dict': {
634 'id': '5123ea6d5e5a7',
635 'ext': 'mp4',
636 'age_limit': 18,
637 'uploader': 'www.handjobhub.com',
d6d9186f 638 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
4d805e06 639 }
0990305d 640 },
1a94ff68
S
641 # MLB embed
642 {
643 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
644 'md5': '96f09a37e44da40dd083e12d9a683327',
645 'info_dict': {
646 'id': '33322633',
647 'ext': 'mp4',
648 'title': 'Ump changes call to ball',
649 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
650 'duration': 48,
651 'timestamp': 1401537900,
652 'upload_date': '20140531',
ec85ded8 653 'thumbnail': r're:^https?://.*\.jpg$',
1a94ff68
S
654 },
655 },
7ded6545
S
656 # Wistia standard embed (async)
657 {
658 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
659 'info_dict': {
660 'id': '807fafadvk',
661 'ext': 'mp4',
662 'title': 'Drip Brennan Dunn Workshop',
663 'description': 'a JV Webinars video from getdrip-1',
664 'duration': 4986.95,
7ded6545 665 'timestamp': 1463607249,
6c114b12 666 'upload_date': '20160518',
7ded6545
S
667 },
668 'params': {
669 'skip_download': True,
16328117 670 },
671 'skip': 'webpage 404 not found',
672 },
ac645ac7
PH
673 # Soundcloud embed
674 {
675 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
676 'info_dict': {
677 'id': '174391317',
678 'ext': 'mp3',
679 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
680 'uploader': 'Sophos Security',
681 'title': 'Chet Chat 171 - Oct 29, 2014',
682 'upload_date': '20141029',
683 }
af63fed7 684 },
db19df6c
S
685 # Soundcloud multiple embeds
686 {
687 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
688 'info_dict': {
689 'id': '52809',
690 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
691 },
692 'playlist_mincount': 7,
693 },
027e2312
S
694 # TuneIn station embed
695 {
696 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
697 'info_dict': {
698 'id': '204146',
699 'ext': 'mp3',
700 'title': 'CNRV',
701 'location': 'Paris, France',
702 'is_live': True,
703 },
704 'params': {
705 # Live stream
706 'skip_download': True,
707 },
708 },
af63fed7
PH
709 # Livestream embed
710 {
711 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
712 'info_dict': {
713 'id': '67864563',
714 'ext': 'flv',
715 'upload_date': '20141112',
716 'title': 'Rosetta #CometLanding webcast HL 10',
717 }
718 },
78d3b3e2
YCH
719 # Another Livestream embed, without 'new.' in URL
720 {
721 'url': 'https://www.freespeech.org/',
722 'info_dict': {
723 'id': '123537347',
724 'ext': 'mp4',
725 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
726 },
727 'params': {
728 # Live stream
729 'skip_download': True,
730 },
731 },
65f3a228
PH
732 # LazyYT
733 {
e8e4cc5a 734 'url': 'https://skiplagged.com/',
65f3a228 735 'info_dict': {
e8e4cc5a
JH
736 'id': 'skiplagged',
737 'title': 'Skiplagged: The smart way to find cheap flights',
65f3a228 738 },
e8e4cc5a
JH
739 'playlist_mincount': 1,
740 'add_ie': ['Youtube'],
4e262a88 741 },
9751a457 742 # Libsyn embed
42bdd9d0
PH
743 {
744 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
745 'info_dict': {
9751a457 746 'id': '3793998',
42bdd9d0
PH
747 'ext': 'mp3',
748 'upload_date': '20141126',
9751a457 749 'title': 'Underground Wellness Radio - Jack Tips: 5 Steps to Permanent Gut Healing',
750 'thumbnail': 'https://assets.libsyn.com/secure/item/3793998/?height=90&width=90',
751 'duration': 3989.0,
42bdd9d0
PH
752 }
753 },
501f13fb
PH
754 # Cinerama player
755 {
756 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
757 'info_dict': {
758 'id': '730m_DandD_1901_512k',
759 'ext': 'mp4',
760 'uploader': 'www.abc.net.au',
761 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
762 }
796df3c6
S
763 },
764 # embedded viddler video
765 {
766 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
767 'info_dict': {
768 'id': '4d03aad9',
769 'ext': 'mp4',
770 'uploader': 'deadspin',
771 'title': 'WALL-TO-GORTAT',
772 'timestamp': 1422285291,
773 'upload_date': '20150126',
774 },
775 'add_ie': ['Viddler'],
a0f71985 776 },
2051acde
S
777 # Libsyn embed
778 {
779 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
780 'info_dict': {
781 'id': '3377616',
782 'ext': 'mp3',
783 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
784 'description': 'md5:601cb790edd05908957dae8aaa866465',
785 'upload_date': '20150220',
786 },
326fa4e6 787 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
2051acde 788 },
a0f71985
PH
789 # jwplayer YouTube
790 {
791 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
792 'info_dict': {
793 'id': 'Mrj4DVp2zeA',
794 'ext': 'mp4',
f37e3f99 795 'upload_date': '20150212',
a0f71985 796 'uploader': 'The National Archives UK',
2637fadc 797 'description': 'md5:8078af856dca76edc42910b61273dbbf',
a0f71985
PH
798 'uploader_id': 'NationalArchives08',
799 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
800 },
59b8ab58 801 },
5620f840
S
802 # jwplayer rtmp
803 {
6899b1d9 804 'url': 'http://www.suffolk.edu/sjc/live.php',
5620f840 805 'info_dict': {
6899b1d9 806 'id': 'live',
5620f840
S
807 'ext': 'flv',
808 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
809 'uploader': 'www.suffolk.edu',
810 },
811 'params': {
812 'skip_download': True,
2637fadc 813 },
6899b1d9 814 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
5620f840 815 },
5e7bbac3 816 # jwplayer with only the json URL
817 {
818 'url': 'https://www.hollywoodreporter.com/news/general-news/dunkirk-team-reveals-what-christopher-nolan-said-oscar-win-meet-your-oscar-winner-1092454',
819 'info_dict': {
820 'id': 'TljWkvWH',
821 'ext': 'mp4',
822 'upload_date': '20180306',
823 'title': 'md5:91eb1862f6526415214f62c00b453936',
824 'description': 'md5:73048ae50ae953da10549d1d2fe9b3aa',
825 'timestamp': 1520367225,
826 },
827 'params': {
828 'skip_download': True,
829 },
830 },
a4a554a7
YCH
831 # Complex jwplayer
832 {
833 'url': 'http://www.indiedb.com/games/king-machine/videos',
834 'info_dict': {
835 'id': 'videos',
836 'ext': 'mp4',
837 'title': 'king machine trailer 1',
2637fadc 838 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
a4a554a7
YCH
839 'thumbnail': r're:^https?://.*\.jpg$',
840 },
841 },
63d990d2 842 {
93e7c699 843 # Youtube embed, formerly: Video.js embed, multiple formats
63d990d2
S
844 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
845 'info_dict': {
846 'id': 'yygqldloqIk',
847 'ext': 'mp4',
848 'title': 'SolidWorks. Урок 6 Настройка чертежа',
849 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
850 'upload_date': '20130314',
851 'uploader': 'PROстое3D',
852 'uploader_id': 'PROstoe3D',
853 },
854 'params': {
855 'skip_download': True,
856 },
857 },
c5b7014a
S
858 {
859 # Video.js embed, single format
860 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
861 'info_dict': {
862 'id': 'watch',
863 'ext': 'mp4',
864 'title': 'Step 1 - Good Foundation',
865 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
866 },
867 'params': {
868 'skip_download': True,
869 },
93e7c699 870 'skip': '404 Not Found',
c5b7014a 871 },
59b8ab58
PH
872 # rtl.nl embed
873 {
874 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
875 'playlist_mincount': 5,
876 'info_dict': {
877 'id': 'aanslagen-kopenhagen',
2637fadc 878 'title': 'Aanslagen Kopenhagen',
59b8ab58 879 }
255fca5e
S
880 },
881 # Zapiks embed
882 {
883 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
884 'info_dict': {
885 'id': '118046',
886 'ext': 'mp4',
887 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
888 }
889 },
66e568de
S
890 # Kaltura embed (different embed code)
891 {
892 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
893 'info_dict': {
894 'id': '1_a52wc67y',
895 'ext': 'flv',
896 'upload_date': '20150127',
897 'uploader_id': 'PremierMedia',
898 'timestamp': int,
899 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
900 },
901 },
87703231
YCH
902 # Kaltura embed with single quotes
903 {
904 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
905 'info_dict': {
906 'id': '0_izeg5utt',
907 'ext': 'mp4',
908 'title': '35871',
909 'timestamp': 1355743100,
910 'upload_date': '20121217',
e30991f9 911 'uploader_id': 'cplapp@learn360.com',
87703231
YCH
912 },
913 'add_ie': ['Kaltura'],
914 },
427cd050
S
915 {
916 # Kaltura embedded via quoted entry_id
917 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
918 'info_dict': {
919 'id': '0_utuok90b',
920 'ext': 'mp4',
921 'title': '06_matthew_brender_raj_dutt',
922 'timestamp': 1466638791,
923 'upload_date': '20160622',
924 },
925 'add_ie': ['Kaltura'],
926 'expected_warnings': [
927 'Could not send HEAD request'
928 ],
929 'params': {
930 'skip_download': True,
931 }
932 },
8ab7e6c4
YCH
933 {
934 # Kaltura embedded, some fileExt broken (#11480)
935 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
936 'info_dict': {
937 'id': '1_sgtvehim',
938 'ext': 'mp4',
939 'title': 'Our "Standard Models" of particle physics and cosmology',
940 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
941 'timestamp': 1321158993,
942 'upload_date': '20111113',
943 'uploader_id': 'kps1',
944 },
945 'add_ie': ['Kaltura'],
946 },
a01825a5
JH
947 {
948 # Kaltura iframe embed
949 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
950 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
951 'info_dict': {
952 'id': '0_f2cfbpwy',
953 'ext': 'mp4',
954 'title': 'I. M. Pei: A Centennial Celebration',
955 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
956 'upload_date': '20170403',
957 'uploader_id': 'batchUser',
958 'timestamp': 1491232186,
959 },
960 'add_ie': ['Kaltura'],
961 },
c21692fa
S
962 {
963 # Kaltura iframe embed, more sophisticated
964 'url': 'http://www.cns.nyu.edu/~eero/math-tools/Videos/lecture-05sep2017.html',
965 'info_dict': {
966 'id': '1_9gzouybz',
967 'ext': 'mp4',
968 'title': 'lecture-05sep2017',
969 'description': 'md5:40f347d91fd4ba047e511c5321064b49',
970 'upload_date': '20170913',
971 'uploader_id': 'eps2',
972 'timestamp': 1505340777,
973 },
974 'params': {
975 'skip_download': True,
976 },
977 'add_ie': ['Kaltura'],
978 },
e30991f9
S
979 {
980 # meta twitter:player
981 'url': 'http://thechive.com/2017/12/08/all-i-want-for-christmas-is-more-twerk/',
982 'info_dict': {
983 'id': '0_01b42zps',
984 'ext': 'mp4',
985 'title': 'Main Twerk (Video)',
986 'upload_date': '20171208',
987 'uploader_id': 'sebastian.salinas@thechive.com',
988 'timestamp': 1512713057,
989 },
990 'params': {
991 'skip_download': True,
992 },
993 'add_ie': ['Kaltura'],
994 },
250b042c
S
995 # referrer protected EaglePlatform embed
996 {
997 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
998 'info_dict': {
999 'id': '582306',
1000 'ext': 'mp4',
1001 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
1002 'thumbnail': r're:^https?://.*\.jpg$',
1003 'duration': 3382,
1004 'view_count': int,
1005 },
1006 'params': {
1007 'skip_download': True,
1008 },
135c9c42 1009 },
665e9452 1010 # ClipYou (EaglePlatform) embed (custom URL)
d47ae7f6
S
1011 {
1012 'url': 'http://muz-tv.ru/play/7129/',
4645432d 1013 # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
d47ae7f6
S
1014 'info_dict': {
1015 'id': '12820',
1016 'ext': 'mp4',
1017 'title': "'O Sole Mio",
ec85ded8 1018 'thumbnail': r're:^https?://.*\.jpg$',
d47ae7f6
S
1019 'duration': 216,
1020 'view_count': int,
1021 },
250b042c
S
1022 'params': {
1023 'skip_download': True,
1024 },
2637fadc 1025 'skip': 'This video is unavailable.',
d47ae7f6 1026 },
f8388757
S
1027 # Pladform embed
1028 {
1029 'url': 'http://muz-tv.ru/kinozal/view/7400/',
1030 'info_dict': {
1031 'id': '100183293',
1032 'ext': 'mp4',
62259846 1033 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
f8388757 1034 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
ec85ded8 1035 'thumbnail': r're:^https?://.*\.jpg$',
f8388757
S
1036 'duration': 694,
1037 'age_limit': 0,
1038 },
2637fadc 1039 'skip': 'HTTP Error 404: Not Found',
f8388757 1040 },
c798f15b
S
1041 # Playwire embed
1042 {
1043 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
1044 'info_dict': {
1045 'id': '3519514',
1046 'ext': 'mp4',
1047 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
ec85ded8 1048 'thumbnail': r're:^https?://.*\.png$',
c798f15b
S
1049 'duration': 45.115,
1050 },
1051 },
a4257017
S
1052 # Crooks and Liars embed
1053 {
1054 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
1055 'info_dict': {
1056 'id': '8RUoRhRi',
1057 'ext': 'mp4',
1058 'title': "Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!",
1059 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
1060 'timestamp': 1428207000,
1061 'upload_date': '20150405',
1062 'uploader': 'Heather',
1063 },
1064 },
1065 # Crooks and Liars external embed
1066 {
1067 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
1068 'info_dict': {
1069 'id': 'MTE3MjUtMzQ2MzA',
1070 'ext': 'mp4',
1071 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
1072 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
1073 'timestamp': 1265032391,
1074 'upload_date': '20100201',
1075 'uploader': 'Heather',
1076 },
1077 },
facecb84 1078 # NBC Sports vplayer embed
a2edf2e7 1079 {
facecb84 1080 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
a2edf2e7 1081 'info_dict': {
facecb84
S
1082 'id': 'ln7x1qSThw4k',
1083 'ext': 'flv',
1084 'title': "PFT Live: New leader in the 'new-look' defense",
1085 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
0738187f
YCH
1086 'uploader': 'NBCU-SPORTS',
1087 'upload_date': '20140107',
1088 'timestamp': 1389118457,
a2edf2e7 1089 },
2637fadc 1090 'skip': 'Invalid Page URL',
418c5cc3 1091 },
de3eb07e
YCH
1092 # NBC News embed
1093 {
1094 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
1095 'md5': '1aa589c675898ae6d37a17913cf68d66',
1096 'info_dict': {
2637fadc 1097 'id': 'x_dtl_oa_LettermanliftPR_160608',
de3eb07e 1098 'ext': 'mp4',
2637fadc 1099 'title': 'David Letterman: A Preview',
de3eb07e 1100 'description': 'A preview of Tom Brokaw\'s interview with David Letterman as part of the On Assignment series powered by Dateline. Airs Sunday June 12 at 7/6c.',
2637fadc
RA
1101 'upload_date': '20160609',
1102 'timestamp': 1465431544,
1103 'uploader': 'NBCU-NEWS',
de3eb07e
YCH
1104 },
1105 },
418c5cc3
YCH
1106 # UDN embed
1107 {
811586eb 1108 'url': 'https://video.udn.com/news/300346',
01c58f84 1109 'md5': 'fd2060e988c326991037b9aff9df21a6',
418c5cc3 1110 'info_dict': {
01c58f84 1111 'id': '300346',
418c5cc3 1112 'ext': 'mp4',
01c58f84 1113 'title': '中一中男師變性 全校師生力挺',
ec85ded8 1114 'thumbnail': r're:^https?://.*\.jpg$',
811586eb
YCH
1115 },
1116 'params': {
1117 # m3u8 download
1118 'skip_download': True,
1119 },
2637fadc 1120 'expected_warnings': ['Failed to parse JSON Expecting value'],
edfcf7ab 1121 },
55adb63e 1122 # Kinja embed
8084be78
S
1123 {
1124 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
1125 'info_dict': {
55adb63e 1126 'id': '106351',
8084be78
S
1127 'ext': 'mp4',
1128 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
55adb63e 1129 'description': 'Migrated from OnionStudios',
ec85ded8 1130 'thumbnail': r're:^https?://.*\.jpe?g$',
55adb63e
RA
1131 'uploader': 'clickhole',
1132 'upload_date': '20150527',
1133 'timestamp': 1432744860,
8084be78
S
1134 }
1135 },
b8c1cc1a
S
1136 # SnagFilms embed
1137 {
1138 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
1139 'info_dict': {
1140 'id': '74849a00-85a9-11e1-9660-123139220831',
1141 'ext': 'mp4',
1142 'title': '#whilewewatch',
1143 }
1144 },
a5158f38
YCH
1145 # AdobeTVVideo embed
1146 {
1147 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
1148 'md5': '43662b577c018ad707a63766462b1e87',
1149 'info_dict': {
1150 'id': '2456',
1151 'ext': 'mp4',
1152 'title': 'New experience with Acrobat DC',
1153 'description': 'New experience with Acrobat DC',
1154 'duration': 248.667,
1155 },
1f812580 1156 },
134c207e
YCH
1157 # Another form of arte.tv embed
1158 {
1159 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
1160 'md5': '850bfe45417ddf221288c88a0cffe2e2',
1161 'info_dict': {
1162 'id': '030273-562_PLUS7-F',
1163 'ext': 'mp4',
1164 'title': 'ARTE Reportage - Nulle part, en France',
1165 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
1166 'upload_date': '20160409',
1167 },
1168 },
4a120778
YCH
1169 # Duplicated embedded video URLs
1170 {
1171 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
1172 'info_dict': {
1173 'id': '149298443_480_16c25b74_2',
1174 'ext': 'mp4',
1175 'title': 'vs. Blue Orange Spring Game',
1176 'uploader': 'www.hudl.com',
1177 },
1178 },
371ddb14
S
1179 # twitter:player:stream embed
1180 {
1181 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
1182 'info_dict': {
1183 'id': 'master',
1184 'ext': 'mp4',
1185 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
1186 'uploader': 'www.rtl.be',
1187 },
1188 'params': {
1189 # m3u8 downloads
1190 'skip_download': True,
1191 },
1192 },
32917907
RA
1193 # twitter:player embed
1194 {
1195 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
1196 'md5': 'a3e0df96369831de324f0778e126653c',
1197 'info_dict': {
1198 'id': '4909620399001',
1199 'ext': 'mp4',
1200 'title': 'What Do Black Holes Sound Like?',
1201 'description': 'what do black holes sound like',
1202 'upload_date': '20160524',
1203 'uploader_id': '29913724001',
1204 'timestamp': 1464107587,
1205 'uploader': 'TheAtlantic',
1206 },
f5a9e9df 1207 'skip': 'Private Youtube video',
fd6ca382
YCH
1208 },
1209 # Facebook <iframe> embed
1210 {
1211 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
dbf0157a 1212 'md5': 'fbcde74f534176ecb015849146dd3aee',
fd6ca382
YCH
1213 'info_dict': {
1214 'id': '599637780109885',
1215 'ext': 'mp4',
1216 'title': 'Facebook video #599637780109885',
1217 },
1218 },
fd1c5fba
S
1219 # Facebook <iframe> embed, plugin video
1220 {
1221 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
1222 'info_dict': {
1223 'id': '1754168231264132',
1224 'ext': 'mp4',
1225 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
1226 'uploader': 'Tariq Ramadan (official)',
1227 'timestamp': 1496758379,
1228 'upload_date': '20170606',
1229 },
1230 'params': {
1231 'skip_download': True,
1232 },
1233 },
fd6ca382
YCH
1234 # Facebook API embed
1235 {
1236 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
dbf0157a 1237 'md5': 'a47372ee61b39a7b90287094d447d94e',
fd6ca382
YCH
1238 'info_dict': {
1239 'id': '10153467542406923',
1240 'ext': 'mp4',
1241 'title': 'Facebook video #10153467542406923',
1242 },
7deef1ba
YCH
1243 },
1244 # Wordpress "YouTube Video Importer" plugin
1245 {
1246 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
dbf0157a 1247 'md5': 'd16797741b560b485194eddda8121b48',
7deef1ba
YCH
1248 'info_dict': {
1249 'id': 'HNTXWDXV9Is',
1250 'ext': 'mp4',
1251 'title': 'Blue Devils Drumline Stanford lot 2016',
1252 'upload_date': '20160627',
1253 'uploader_id': 'GENOCIDE8GENERAL10',
1254 'uploader': 'cylus cyrus',
1255 },
1256 },
81953d1a
RA
1257 {
1258 # video stored on custom kaltura server
1259 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
1260 'md5': '537617d06e64dfed891fa1593c4b30cc',
1261 'info_dict': {
1262 'id': '0_1iotm5bh',
1263 'ext': 'mp4',
1264 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
1265 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
1266 'uploader_id': 'videos.expansion@el-mundo.net',
1267 'upload_date': '20150429',
1268 'timestamp': 1430303472,
1269 },
1270 'add_ie': ['Kaltura'],
1271 },
562de77f
S
1272 {
1273 # multiple kaltura embeds, nsfw
1274 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html',
1275 'info_dict': {
1276 'id': 'kamila-avec-video-jaime-sadomie',
1277 'title': "Kamila avec vídeo “J'aime sadomie”",
1278 },
1279 'playlist_count': 8,
1280 },
c03adf90
YCH
1281 {
1282 # Non-standard Vimeo embed
1283 'url': 'https://openclassrooms.com/courses/understanding-the-web',
1284 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
1285 'info_dict': {
1286 'id': '148867247',
1287 'ext': 'mp4',
1288 'title': 'Understanding the web - Teaser',
1289 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
1290 'upload_date': '20151214',
1291 'uploader': 'OpenClassrooms',
1292 'uploader_id': 'openclassrooms',
1293 },
1294 'add_ie': ['Vimeo'],
1295 },
a5ff05df
S
1296 {
1297 # generic vimeo embed that requires original URL passed as Referer
1298 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
1299 'only_matching': True,
1300 },
1979969f
S
1301 {
1302 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
1303 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
1304 'info_dict': {
1305 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
1306 'ext': 'mp4',
1307 'title': 'Big Buck Bunny',
1308 'description': 'Royalty free test video',
1309 'timestamp': 1432816365,
1310 'upload_date': '20150528',
1311 'is_live': False,
1312 },
1313 'params': {
1314 'skip_download': True,
1315 },
bfd973ec 1316 'add_ie': ['Arkena'],
1979969f 1317 },
2a1321a2
S
1318 {
1319 'url': 'http://nova.bg/news/view/2016/08/16/156543/%D0%BD%D0%B0-%D0%BA%D0%BE%D1%81%D1%8A%D0%BC-%D0%BE%D1%82-%D0%B2%D0%B7%D1%80%D0%B8%D0%B2-%D0%BE%D1%82%D1%86%D0%B5%D0%BF%D0%B8%D1%85%D0%B0-%D1%86%D1%8F%D0%BB-%D0%BA%D0%B2%D0%B0%D1%80%D1%82%D0%B0%D0%BB-%D0%B7%D0%B0%D1%80%D0%B0%D0%B4%D0%B8-%D0%B8%D0%B7%D1%82%D0%B8%D1%87%D0%B0%D0%BD%D0%B5-%D0%BD%D0%B0-%D0%B3%D0%B0%D0%B7-%D0%B2-%D0%BF%D0%BB%D0%BE%D0%B2%D0%B4%D0%B8%D0%B2/',
1320 'info_dict': {
1321 'id': '1c7141f46c',
1322 'ext': 'mp4',
1323 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
1324 },
1325 'params': {
1326 'skip_download': True,
1327 },
bfd973ec 1328 'add_ie': ['Vbox7'],
2a1321a2 1329 },
b0c8f2e9
DR
1330 {
1331 # DBTV embeds
1332 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
fd3ec986
S
1333 'info_dict': {
1334 'id': '43254897',
1335 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
1336 },
b0c8f2e9
DR
1337 'playlist_mincount': 3,
1338 },
e186a9ec
S
1339 {
1340 # Videa embeds
1341 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
1342 'info_dict': {
1343 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
1344 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
1345 },
1346 'playlist_mincount': 2,
1347 },
b687c85e
S
1348 {
1349 # 20 minuten embed
1350 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
1351 'info_dict': {
1352 'id': '523629',
1353 'ext': 'mp4',
1354 'title': 'So kommen Sie bei Eis und Schnee sicher an',
1355 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
1356 },
1357 'params': {
1358 'skip_download': True,
1359 },
bfd973ec 1360 'add_ie': ['TwentyMinuten'],
6ef3e65a
S
1361 },
1362 {
1363 # VideoPress embed
1364 'url': 'https://en.support.wordpress.com/videopress/',
1365 'info_dict': {
1366 'id': 'OcobLTqC',
1367 'ext': 'm4v',
1368 'title': 'IMG_5786',
1369 'timestamp': 1435711927,
1370 'upload_date': '20150701',
1371 },
1372 'params': {
1373 'skip_download': True,
1374 },
bfd973ec 1375 'add_ie': ['VideoPress'],
fef51645 1376 },
eb3079b6
S
1377 {
1378 # Rutube embed
1379 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
1380 'info_dict': {
1381 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
1382 'ext': 'flv',
1383 'title': 'Магаззино: Казань 2',
1384 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
1385 'uploader': 'Магаззино',
1386 'upload_date': '20170228',
1387 'uploader_id': '996642',
1388 },
1389 'params': {
1390 'skip_download': True,
1391 },
bfd973ec 1392 'add_ie': ['Rutube'],
eb3079b6 1393 },
71738b14 1394 {
fdf80059 1395 # glomex:embed
71738b14
ZM
1396 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes',
1397 'info_dict': {
1398 'id': 'v-ch2nkhcirwc9-sf',
1399 'ext': 'mp4',
1400 'title': 'md5:786e1e24e06c55993cee965ef853a0c1',
1401 'description': 'md5:8b517a61d577efe7e36fde72fd535995',
1402 'timestamp': 1641885019,
1403 'upload_date': '20220111',
1404 'duration': 460000,
b143e83e 1405 'thumbnail': 'https://i3thumbs.glomex.com/dC1idjJwdndiMjRzeGwvMjAyMi8wMS8xMS8wNy8xMF8zNV82MWRkMmQ2YmU5ZTgyLmpwZw==/profile:player-960x540',
71738b14
ZM
1406 },
1407 },
b143e83e
ZM
1408 {
1409 # megatvcom:embed
1410 'url': 'https://www.in.gr/2021/12/18/greece/apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize/',
1411 'info_dict': {
1412 'id': 'apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize',
1413 'title': 'md5:5e569cf996ec111057c2764ec272848f',
1414 },
1415 'playlist': [{
1416 'md5': '1afa26064ff00ccb91617957dbc73dc1',
1417 'info_dict': {
1418 'ext': 'mp4',
1419 'id': '564916',
1420 'display_id': 'md5:6cdf22d3a2e7bacb274b7295089a1770',
1421 'title': 'md5:33b9dd39584685b62873043670eb52a6',
1422 'description': 'md5:c1db7310f390518ac36dd69d947ef1a1',
1423 'timestamp': 1639753145,
1424 'upload_date': '20211217',
1425 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/prezerakos-1024x597.jpg',
1426 },
1427 }, {
1428 'md5': '4a1c220695f1ef865a8b7966a53e2474',
1429 'info_dict': {
1430 'ext': 'mp4',
1431 'id': '564905',
1432 'display_id': 'md5:ead15695e485e649aed2b81ebd699b88',
1433 'title': 'md5:2b71fd54249a3ca34609fe39ae31c47b',
1434 'description': 'md5:c42e12f638d0a97d6de4508e2c4df982',
1435 'timestamp': 1639753047,
1436 'upload_date': '20211217',
1437 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/tsiodras-mitsotakis-1024x545.jpg',
1438 },
1439 }]
1440 },
2d49720f
ZM
1441 {
1442 'url': 'https://www.ertnews.gr/video/manolis-goyalles-o-anthropos-piso-apo-ti-diadiktyaki-vasilopita/',
1443 'info_dict': {
1444 'id': '2022/tv/news-themata-ianouarios/20220114-apotis6-gouales-pita.mp4',
1445 'ext': 'mp4',
1446 'title': 'md5:df64f5b61c06d0e9556c0cdd5cf14464',
1447 'thumbnail': 'https://www.ert.gr/themata/photos/2021/20220114-apotis6-gouales-pita.jpg',
1448 },
1449 },
fef51645
YCH
1450 {
1451 # ThePlatform embedded with whitespaces in URLs
1452 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
1453 'only_matching': True,
1454 },
97952bdb
JH
1455 {
1456 # Senate ISVP iframe https
1457 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
1458 'md5': 'fb8c70b0b515e5037981a2492099aab8',
1459 'info_dict': {
1460 'id': 'govtaff020316',
1461 'ext': 'mp4',
1462 'title': 'Integrated Senate Video Player',
1463 },
bfd973ec 1464 'add_ie': ['SenateISVP'],
97952bdb 1465 },
ab87c260
S
1466 {
1467 # Limelight embeds (1 channel embed + 4 media embeds)
1468 'url': 'http://www.sedona.com/FacilitatorTraining2017',
1469 'info_dict': {
1470 'id': 'FacilitatorTraining2017',
1471 'title': 'Facilitator Training 2017',
1472 },
1473 'playlist_mincount': 5,
1474 },
eb02940c
S
1475 {
1476 # Limelight embed (LimelightPlayerUtil.embed)
1477 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
1478 'info_dict': {
1479 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
1480 'ext': 'mp4',
1481 'title': '07448641',
1482 'timestamp': 1499890639,
1483 'upload_date': '20170712',
1484 },
1485 'params': {
1486 'skip_download': True,
1487 },
1488 'add_ie': ['LimelightMedia'],
1489 },
7986c3ab
S
1490 {
1491 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
1492 'info_dict': {
1493 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
1494 'title': 'Standoff with Walnut Creek murder suspect ends',
1495 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
1496 },
1497 'playlist_mincount': 4,
1498 },
55719459
JH
1499 {
1500 # WashingtonPost embed
1501 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
1502 'info_dict': {
1503 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
1504 'ext': 'mp4',
1505 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
1506 'description': 'Donald Trump wanted a weekly TV drama based on his life. It never aired. But The Washington Post recently obtained a scene from the pilot script — and enlisted actors.',
1507 'timestamp': 1455216756,
1508 'uploader': 'The Washington Post',
1509 'upload_date': '20160211',
1510 },
bfd973ec 1511 'add_ie': ['WashingtonPost'],
55719459 1512 },
73cf76a9
S
1513 {
1514 # JOJ.sk embeds
1515 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
1516 'info_dict': {
1517 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
1518 'title': 'Slovenskom sa prehnala vlna silných búrok',
1519 },
1520 'playlist_mincount': 5,
bfd973ec 1521 'add_ie': ['Joj'],
73cf76a9 1522 },
4328ddf8
S
1523 {
1524 # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
1525 'url': 'https://tvrain.ru/amp/418921/',
1526 'md5': 'cc00413936695987e8de148b67d14f1d',
1527 'info_dict': {
1528 'id': '418921',
1529 'ext': 'mp4',
1530 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
1531 },
1532 },
9ce1ac40 1533 {
1534 # multiple HTML5 videos on one page
1535 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
1536 'info_dict': {
1537 'id': 'keyscenarios',
1538 'title': 'Rescue Kit 14 Free Edition - Getting started',
1539 },
1540 'playlist_count': 4,
0987f2dd
T
1541 },
1542 {
1543 # vshare embed
7a5c1cfe 1544 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
0987f2dd
T
1545 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
1546 'info_dict': {
1547 'id': '0f64ce6',
1548 'title': 'vl14062007715967',
1549 'ext': 'mp4',
1550 }
2ca7ed41
S
1551 },
1552 {
1553 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
1554 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
1555 'info_dict': {
1556 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
1557 'ext': 'mp4',
1558 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
1559 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
1560 'timestamp': 1474354800,
1561 'upload_date': '20160920',
1562 }
7d540621
S
1563 },
1564 {
1565 'url': 'http://www.kidzworld.com/article/30935-trolls-the-beat-goes-on-interview-skylar-astin-and-amanda-leighton',
1566 'info_dict': {
1567 'id': '1731611',
1568 'ext': 'mp4',
1569 'title': 'Official Trailer | TROLLS: THE BEAT GOES ON!',
1570 'description': 'md5:eb5f23826a027ba95277d105f248b825',
1571 'timestamp': 1516100691,
1572 'upload_date': '20180116',
1573 },
1574 'params': {
1575 'skip_download': True,
1576 },
bfd973ec 1577 'add_ie': ['SpringboardPlatform'],
ea696249 1578 },
4c780fbd
S
1579 {
1580 'url': 'https://www.yapfiles.ru/show/1872528/690b05d3054d2dbe1e69523aa21bb3b1.mp4.html',
1581 'info_dict': {
1582 'id': 'vMDE4NzI1Mjgt690b',
1583 'ext': 'mp4',
1584 'title': 'Котята',
1585 },
bfd973ec 1586 'add_ie': ['YapFiles'],
4c780fbd
S
1587 'params': {
1588 'skip_download': True,
1589 },
1fc37ca3 1590 },
660a230b
S
1591 {
1592 # CloudflareStream embed
1593 'url': 'https://www.cloudflare.com/products/cloudflare-stream/',
1594 'info_dict': {
1595 'id': '31c9291ab41fac05471db4e73aa11717',
1596 'ext': 'mp4',
1597 'title': '31c9291ab41fac05471db4e73aa11717',
1598 },
bfd973ec 1599 'add_ie': ['CloudflareStream'],
660a230b
S
1600 'params': {
1601 'skip_download': True,
1602 },
1603 },
6bd499e8
S
1604 {
1605 # PeerTube embed
1606 'url': 'https://joinpeertube.org/fr/home/',
1607 'info_dict': {
1608 'id': 'home',
1609 'title': 'Reprenez le contrôle de vos vidéos ! #JoinPeertube',
1610 },
1611 'playlist_count': 2,
1612 },
aee36ca8
S
1613 {
1614 # Indavideo embed
1615 'url': 'https://streetkitchen.hu/receptek/igy_kell_otthon_hamburgert_sutni/',
1616 'info_dict': {
1617 'id': '1693903',
1618 'ext': 'mp4',
1619 'title': 'Így kell otthon hamburgert sütni',
1620 'description': 'md5:f5a730ecf900a5c852e1e00540bbb0f7',
1621 'timestamp': 1426330212,
1622 'upload_date': '20150314',
1623 'uploader': 'StreetKitchen',
1624 'uploader_id': '546363',
1625 },
bfd973ec 1626 'add_ie': ['IndavideoEmbed'],
aee36ca8
S
1627 'params': {
1628 'skip_download': True,
1629 },
1630 },
cfd7f2a6
S
1631 {
1632 # APA embed via JWPlatform embed
1633 'url': 'http://www.vol.at/blue-man-group/5593454',
1634 'info_dict': {
1635 'id': 'jjv85FdZ',
1636 'ext': 'mp4',
1637 'title': '"Blau ist mysteriös": Die Blue Man Group im Interview',
1638 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
1639 'thumbnail': r're:^https?://.*\.jpg$',
1640 'duration': 254,
1641 'timestamp': 1519211149,
1642 'upload_date': '20180221',
1643 },
1644 'params': {
1645 'skip_download': True,
1646 },
1647 },
1fc37ca3
SO
1648 {
1649 'url': 'http://share-videos.se/auto/video/83645793?uid=13',
1650 'md5': 'b68d276de422ab07ee1d49388103f457',
1651 'info_dict': {
1652 'id': '83645793',
1653 'title': 'Lock up and get excited',
1fc37ca3 1654 'ext': 'mp4'
d3431dcb
S
1655 },
1656 'skip': 'TODO: fix nested playlists processing in tests',
1657 },
9d1b2138
S
1658 {
1659 # Viqeo embeds
1660 'url': 'https://viqeo.tv/',
1661 'info_dict': {
1662 'id': 'viqeo',
1663 'title': 'All-new video platform',
1664 },
1665 'playlist_count': 6,
1666 },
29f7c58a 1667 # {
1668 # # Zype embed
1669 # 'url': 'https://www.cookscountry.com/episode/554-smoky-barbecue-favorites',
1670 # 'info_dict': {
1671 # 'id': '5b400b834b32992a310622b9',
1672 # 'ext': 'mp4',
1673 # 'title': 'Smoky Barbecue Favorites',
1674 # 'thumbnail': r're:^https?://.*\.jpe?g',
1675 # 'description': 'md5:5ff01e76316bd8d46508af26dc86023b',
1676 # 'upload_date': '20170909',
1677 # 'timestamp': 1504915200,
1678 # },
1679 # 'add_ie': [ZypeIE.ie_key()],
1680 # 'params': {
1681 # 'skip_download': True,
1682 # },
1683 # },
e0b6e988
S
1684 {
1685 # videojs embed
1686 'url': 'https://video.sibnet.ru/shell.php?videoid=3422904',
1687 'info_dict': {
1688 'id': 'shell',
1689 'ext': 'mp4',
1690 'title': 'Доставщик пиццы спросил разрешения сыграть на фортепиано',
1691 'description': 'md5:89209cdc587dab1e4a090453dbaa2cb1',
1692 'thumbnail': r're:^https?://.*\.jpg$',
1693 },
1694 'params': {
1695 'skip_download': True,
1696 },
1697 'expected_warnings': ['Failed to download MPD manifest'],
1698 },
5e3da0d4
RA
1699 {
1700 # DailyMotion embed with DM.player
1701 'url': 'https://www.beinsports.com/us/copa-del-rey/video/the-locker-room-valencia-beat-barca-in-copa/1203804',
1702 'info_dict': {
1703 'id': 'k6aKkGHd9FJs4mtJN39',
1704 'ext': 'mp4',
1705 'title': 'The Locker Room: Valencia Beat Barca In Copa del Rey Final',
1706 'description': 'This video is private.',
1707 'uploader_id': 'x1jf30l',
1708 'uploader': 'beIN SPORTS USA',
1709 'upload_date': '20190528',
1710 'timestamp': 1559062971,
1711 },
1712 'params': {
1713 'skip_download': True,
1714 },
1715 },
1a20d295
ZM
1716 {
1717 # tvopengr:embed
1718 'url': 'https://www.ethnos.gr/World/article/190604/hparosiaxekinoynoisynomiliessthgeneyhmethskiatoypolemoypanoapothnoykrania',
1719 'md5': 'eb0c3995d0a6f18f6538c8e057865d7d',
1720 'info_dict': {
1721 'id': '101119',
1722 'ext': 'mp4',
1723 'display_id': 'oikarpoitondiapragmateyseonhparosias',
1724 'title': 'md5:b979f4d640c568617d6547035528a149',
1725 'description': 'md5:e54fc1977c7159b01cc11cd7d9d85550',
1726 'timestamp': 1641772800,
1727 'upload_date': '20220110',
1728 'thumbnail': 'https://opentv-static.siliconweb.com/imgHandler/1920/70bc39fa-895b-4918-a364-c39d2135fc6d.jpg',
1729
1730 }
1731 },
764f5de2
PW
1732 {
1733 # blogger embed
1734 'url': 'https://blog.tomeuvizoso.net/2019/01/a-panfrost-milestone.html',
1735 'md5': 'f1bc19b6ea1b0fd1d81e84ca9ec467ac',
1736 'info_dict': {
1737 'id': 'BLOGGER-video-3c740e3a49197e16-796',
1738 'ext': 'mp4',
1739 'title': 'Blogger',
1740 'thumbnail': r're:^https?://.*',
1741 },
1742 },
6e6b70d6
S
1743 # {
1744 # # TODO: find another test
1745 # # http://schema.org/VideoObject
1746 # 'url': 'https://flipagram.com/f/nyvTSJMKId',
1747 # 'md5': '888dcf08b7ea671381f00fab74692755',
1748 # 'info_dict': {
1749 # 'id': 'nyvTSJMKId',
1750 # 'ext': 'mp4',
1751 # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
1752 # 'description': '#love for cats.',
1753 # 'timestamp': 1461244995,
1754 # 'upload_date': '20160421',
1755 # },
1756 # 'params': {
1757 # 'force_generic_extractor': True,
1758 # },
29f7c58a 1759 # },
1760 {
1761 # VHX Embed
1762 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
1763 'info_dict': {
1764 'id': '858208',
1765 'ext': 'mp4',
1766 'title': 'Untitled',
1767 'uploader_id': 'user80538407',
1768 'uploader': 'OTT Videos',
1769 },
1770 },
1771 {
1772 # ArcPublishing PoWa video player
1773 'url': 'https://www.adn.com/politics/2020/11/02/video-senate-candidates-campaign-in-anchorage-on-eve-of-election-day/',
1774 'md5': 'b03b2fac8680e1e5a7cc81a5c27e71b3',
1775 'info_dict': {
1776 'id': '8c99cb6e-b29c-4bc9-9173-7bf9979225ab',
1777 'ext': 'mp4',
1778 'title': 'Senate candidates wave to voters on Anchorage streets',
1779 'description': 'md5:91f51a6511f090617353dc720318b20e',
1780 'timestamp': 1604378735,
1781 'upload_date': '20201103',
1782 'duration': 1581,
1783 },
1784 },
2181983a 1785 {
1786 # MyChannels SDK embed
1787 # https://www.24kitchen.nl/populair/deskundige-dit-waarom-sommigen-gevoelig-zijn-voor-voedselallergieen
1788 'url': 'https://www.demorgen.be/nieuws/burgemeester-rotterdam-richt-zich-in-videoboodschap-tot-relschoppers-voelt-het-goed~b0bcfd741/',
1789 'md5': '90c0699c37006ef18e198c032d81739c',
1790 'info_dict': {
1791 'id': '194165',
1792 'ext': 'mp4',
1793 'title': 'Burgemeester Aboutaleb spreekt relschoppers toe',
1794 'timestamp': 1611740340,
1795 'upload_date': '20210127',
1796 'duration': 159,
1797 },
1798 },
bc2ca1bb 1799 {
1800 # Simplecast player embed
1801 'url': 'https://www.bio.org/podcast',
1802 'info_dict': {
1803 'id': 'podcast',
1804 'title': 'I AM BIO Podcast | BIO',
1805 },
1806 'playlist_mincount': 52,
b73612a2 1807 }, {
e4edeb62 1808 # WimTv embed player
1809 'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
1810 'info_dict': {
1811 'id': 'wearefmi-pt-2-2021',
1812 'title': '#WEAREFMI – PT.2 – 2021 – MsMotorTV',
1813 },
1814 'playlist_count': 1,
a318f59d 1815 }, {
1816 # KVS Player
1817 'url': 'https://www.kvs-demo.com/videos/105/kelis-4th-of-july/',
1818 'info_dict': {
1819 'id': '105',
1820 'display_id': 'kelis-4th-of-july',
1821 'ext': 'mp4',
1822 'title': 'Kelis - 4th Of July',
32a84bcf
SS
1823 'description': 'Kelis - 4th Of July',
1824 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
a318f59d 1825 },
1826 'params': {
1827 'skip_download': True,
1828 },
32a84bcf 1829 'expected_warnings': ['Untested major version'],
a318f59d 1830 }, {
1831 # KVS Player
1832 'url': 'https://www.kvs-demo.com/embed/105/',
1833 'info_dict': {
1834 'id': '105',
1835 'display_id': 'kelis-4th-of-july',
1836 'ext': 'mp4',
1837 'title': 'Kelis - 4th Of July / Embed Player',
32a84bcf 1838 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
a318f59d 1839 },
1840 'params': {
1841 'skip_download': True,
1842 },
1843 }, {
a318f59d 1844 'url': 'https://youix.com/video/leningrad-zoj/',
1845 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
1846 'info_dict': {
1847 'id': '18485',
1848 'display_id': 'leningrad-zoj',
1849 'ext': 'mp4',
1850 'title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',
32a84bcf
SS
1851 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
1852 },
a318f59d 1853 }, {
1854 # KVS Player
1855 'url': 'https://youix.com/embed/18485',
1856 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
1857 'info_dict': {
1858 'id': '18485',
1859 'display_id': 'leningrad-zoj',
1860 'ext': 'mp4',
1861 'title': 'Ленинград - ЗОЖ',
32a84bcf
SS
1862 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
1863 },
a318f59d 1864 }, {
1865 # KVS Player
1866 'url': 'https://bogmedia.org/videos/21217/40-nochey-40-nights-2016/',
1867 'md5': '94166bdb26b4cb1fb9214319a629fc51',
1868 'info_dict': {
1869 'id': '21217',
32a84bcf 1870 'display_id': '40-nochey-2016',
a318f59d 1871 'ext': 'mp4',
1872 'title': '40 ночей (2016) - BogMedia.org',
32a84bcf 1873 'description': 'md5:4e6d7d622636eb7948275432eb256dc3',
a318f59d 1874 'thumbnail': 'https://bogmedia.org/contents/videos_screenshots/21000/21217/preview_480p.mp4.jpg',
32a84bcf 1875 },
e4edeb62 1876 },
9980d3d2 1877 {
1878 # KVS Player (for sites that serve kt_player.js via non-https urls)
1879 'url': 'http://www.camhub.world/embed/389508',
1880 'md5': 'fbe89af4cfb59c8fd9f34a202bb03e32',
1881 'info_dict': {
1882 'id': '389508',
1883 'display_id': 'syren-de-mer-onlyfans-05-07-2020have-a-happy-safe-holiday5f014e68a220979bdb8cd-source',
1884 'ext': 'mp4',
32a84bcf
SS
1885 'title': 'Syren De Mer onlyfans_05-07-2020Have_a_happy_safe_holiday5f014e68a220979bdb8cd_source / Embed плеер',
1886 'thumbnail': r're:https?://www\.camhub\.world/contents/videos_screenshots/389000/389508/preview\.mp4\.jpg',
1887 },
9980d3d2 1888 },
e16fefd8
JL
1889 {
1890 # Reddit-hosted video that will redirect and be processed by RedditIE
1891 # Redirects to https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
1892 'url': 'https://v.redd.it/zv89llsvexdz',
1893 'md5': '87f5f02f6c1582654146f830f21f8662',
1894 'info_dict': {
1895 'id': 'zv89llsvexdz',
1896 'ext': 'mp4',
1897 'timestamp': 1501941939.0,
1898 'title': 'That small heart attack.',
1899 'upload_date': '20170805',
1900 'uploader': 'Antw87'
1901 }
1902 },
1903 {
1904 # 1080p Reddit-hosted video that will redirect and be processed by RedditIE
1905 'url': 'https://v.redd.it/33hgok7dfbz71/',
1906 'md5': '7a1d587940242c9bb3bd6eb320b39258',
1907 'info_dict': {
1908 'id': '33hgok7dfbz71',
1909 'ext': 'mp4',
1910 'title': "The game Didn't want me to Knife that Guy I guess",
1911 'uploader': 'paraf1ve',
1912 'timestamp': 1636788683.0,
1913 'upload_date': '20211113'
1914 }
9f517bb1 1915 },
9c634ef8 1916 {
1917 # MainStreaming player
1918 'url': 'https://www.lactv.it/2021/10/03/lac-news24-la-settimana-03-10-2021/',
1919 'info_dict': {
1920 'id': 'EUlZfGWkGpOd',
1921 'title': 'La Settimana ',
1922 'description': '03 Ottobre ore 02:00',
1923 'ext': 'mp4',
1924 'live_status': 'not_live',
1925 'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster',
1926 'duration': 1512
1927 }
1928 },
9f517bb1 1929 {
1930 # Multiple gfycat iframe embeds
1931 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
1932 'info_dict': {
1933 'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
1934 'id': 'board'
1935 },
1936 'playlist_count': 8,
1937 },
1938 {
1939 # Multiple gfycat gifs (direct links)
1940 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
1941 'info_dict': {
1942 'title': '옳게 된 크롭 니트 스테이씨 아이사',
1943 'id': 'board'
1944 },
1945 'playlist_count': 6
1946 },
1947 {
1948 # Multiple gfycat embeds, with uppercase "IFR" in urls
1949 'url': 'https://kkzz.kr/?vid=2295',
1950 'info_dict': {
1951 'title': '지방시 앰버서더 에스파 카리나 움짤',
1952 'id': '?vid=2295'
1953 },
1954 'playlist_count': 9
e248be33 1955 },
1956 {
1957 # Panopto embeds
1958 'url': 'https://www.monash.edu/learning-teaching/teachhq/learning-technologies/panopto/how-to/insert-a-quiz-into-a-panopto-video',
1959 'info_dict': {
bfd973ec 1960 'ext': 'mp4',
1961 'id': '0bd3f16c-824a-436a-8486-ac5900693aef',
1962 'title': 'Quizzes in Panopto',
e248be33 1963 },
0a8a7e68
TI
1964 },
1965 {
1966 # Ruutu embed
1967 'url': 'https://www.nelonen.fi/ohjelmat/madventures-suomi/2160731-riku-ja-tunna-lahtevat-peurajahtiin-tv-sta-tutun-biologin-kanssa---metsastysreissu-huipentuu-kasvissyojan-painajaiseen',
1968 'md5': 'a2513a98d3496099e6eced40f7e6a14b',
1969 'info_dict': {
1970 'id': '4044426',
1971 'ext': 'mp4',
1972 'title': 'Riku ja Tunna lähtevät peurajahtiin tv:stä tutun biologin kanssa – metsästysreissu huipentuu kasvissyöjän painajaiseen!',
1973 'thumbnail': r're:^https?://.+\.jpg$',
1974 'duration': 108,
a44ca5a4 1975 'series': 'Madventures Suomi',
0a8a7e68
TI
1976 'description': 'md5:aa55b44bd06a1e337a6f1d0b46507381',
1977 'categories': ['Matkailu', 'Elämäntyyli'],
1978 'age_limit': 0,
1979 'upload_date': '20220308',
1980 },
1981 },
a0fe51d5
TI
1982 {
1983 # Multiple Ruutu embeds
1984 'url': 'https://www.hs.fi/kotimaa/art-2000008762560.html',
1985 'info_dict': {
1986 'title': 'Koronavirus | Epidemiahuippu voi olla Suomessa ohi, mutta koronaviruksen poistamista yleisvaarallisten tautien joukosta harkitaan vasta syksyllä',
1987 'id': 'art-2000008762560'
1988 },
1989 'playlist_count': 3
1990 },
1991 {
1992 # Ruutu embed in hs.fi with a single video
1993 'url': 'https://www.hs.fi/kotimaa/art-2000008793421.html',
1994 'md5': 'f8964e65d8fada6e8a562389bf366bb4',
1995 'info_dict': {
1996 'id': '4081841',
1997 'ext': 'mp4',
1998 'title': 'Puolustusvoimat siirsi panssariajoneuvoja harjoituksiin Niinisaloon 2.5.2022',
1999 'thumbnail': r're:^https?://.+\.jpg$',
2000 'duration': 138,
2001 'age_limit': 0,
2002 'upload_date': '20220504',
2003 },
2004 },
80e8493e 2005 {
2006 # Webpage contains double BOM
2007 'url': 'https://www.filmarkivet.se/movies/paris-d-moll/',
2008 'md5': 'df02cadc719dcc63d43288366f037754',
2009 'info_dict': {
2010 'id': 'paris-d-moll',
2011 'ext': 'mp4',
2012 'upload_date': '20220518',
2013 'title': 'Paris d-moll',
2014 'description': 'md5:319e37ea5542293db37e1e13072fe330',
2015 'thumbnail': 'https://www.filmarkivet.se/wp-content/uploads/parisdmoll2.jpg',
2016 'timestamp': 1652833414,
2017 'age_limit': 0,
2018 }
612e31f5
E
2019 },
2020 {
2021 'url': 'https://www.mollymovieclub.com/p/interstellar?s=r#details',
2022 'md5': '198bde8bed23d0b23c70725c83c9b6d9',
2023 'info_dict': {
2024 'id': '53602801',
2025 'ext': 'mpga',
2026 'title': 'Interstellar',
2027 'description': 'Listen now | Episode One',
2028 'thumbnail': 'md5:c30d9c83f738e16d8551d7219d321538',
2029 'uploader': 'Molly Movie Club',
2030 'uploader_id': '839621',
2031 },
2032 },
2033 {
2034 'url': 'https://www.blockedandreported.org/p/episode-117-lets-talk-about-depp?s=r',
2035 'md5': 'c0cc44ee7415daeed13c26e5b56d6aa0',
2036 'info_dict': {
2037 'id': '57962052',
2038 'ext': 'mpga',
2039 'title': 'md5:855b2756f0ee10f6723fa00b16266f8d',
2040 'description': 'md5:fe512a5e94136ad260c80bde00ea4eef',
2041 'thumbnail': 'md5:2218f27dfe517bb5ac16c47d0aebac59',
2042 'uploader': 'Blocked and Reported',
2043 'uploader_id': '500230',
2044 },
2045 },
2046 {
55baa67c 2047 'url': 'https://www.skimag.com/video/ski-people-1980/',
bfd973ec 2048 'md5': '022a7e31c70620ebec18deeab376ee03',
55baa67c 2049 'info_dict': {
bfd973ec 2050 'id': 'YTmgRiNU',
2051 'ext': 'mp4',
2052 'title': '1980 Ski People',
2053 'timestamp': 1610407738,
2054 'description': 'md5:cf9c3d101452c91e141f292b19fe4843',
2055 'thumbnail': 'https://cdn.jwplayer.com/v2/media/YTmgRiNU/poster.jpg?width=720',
2056 'duration': 5688.0,
2057 'upload_date': '20210111',
2058 }
55baa67c 2059 },
f3c0c773 2060 {
2061 'note': 'JSON LD with multiple @type',
2062 'url': 'https://www.nu.nl/280161/video/hoe-een-bladvlo-dit-verwoestende-japanse-onkruid-moet-vernietigen.html',
2063 'md5': 'c7949f34f57273013fb7ccb1156393db',
2064 'info_dict': {
2065 'id': 'ipy2AcGL',
2066 'ext': 'mp4',
2067 'description': 'md5:6a9d644bab0dc2dc06849c2505d8383d',
2068 'thumbnail': r're:https://media\.nu\.nl/m/.+\.jpg',
2069 'title': 'Hoe een bladvlo dit verwoestende Japanse onkruid moet vernietigen',
2070 'timestamp': 1586577474,
2071 'upload_date': '20200411',
2072 'age_limit': 0,
2073 'duration': 111.0,
2074 }
2075 },
1d55ebab
SS
2076 {
2077 'note': 'JSON LD with unexpected data type',
2078 'url': 'https://www.autoweek.nl/autotests/artikel/porsche-911-gt3-rs-rij-impressie-2/',
2079 'info_dict': {
2080 'id': 'porsche-911-gt3-rs-rij-impressie-2',
2081 'ext': 'mp4',
2082 'title': 'Test: Porsche 911 GT3 RS',
2083 'description': 'Je ziet het niet, maar het is er wel. Downforce, hebben we het dan over. En in de nieuwe Porsche 911 GT3 RS is er zelfs heel veel downforce.',
2084 'timestamp': 1664920902,
2085 'upload_date': '20221004',
2086 'thumbnail': r're:^https://media.autoweek.nl/m/.+\.jpg$',
2087 'age_limit': 0,
2088 'direct': True,
2089 }
05997b6e 2090 },
2091 {
3e01ce74 2092 'note': 'server returns data in brotli compression by default if `accept-encoding: *` is specified.',
2093 'url': 'https://www.extra.cz/cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
2094 'info_dict': {
2095 'id': 'cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
2096 'ext': 'mp4',
2097 'title': 'čauky lidi 70 finall',
2098 'description': 'čauky lidi 70 finall',
2099 'thumbnail': 'h',
2100 'upload_date': '20220606',
2101 'timestamp': 1654513791,
2102 'duration': 318.0,
2103 'direct': True,
2104 'age_limit': 0,
05997b6e 2105 },
2106 },
2107 {
2108 'note': 'JW Player embed with unicode-escape sequences in URL',
2109 'url': 'https://www.medici.tv/en/concerts/lahav-shani-mozart-mahler-israel-philharmonic-abu-dhabi-classics',
2110 'info_dict': {
2111 'id': 'm',
2112 'ext': 'mp4',
2113 'title': 'Lahav Shani conducts the Israel Philharmonic\'s first-ever concert in Abu Dhabi',
2114 'description': 'Mahler\'s ',
2115 'uploader': 'www.medici.tv',
2116 'age_limit': 0,
2117 'thumbnail': r're:^https?://.+\.jpg',
2118 },
2119 'params': {
2120 'skip_download': True,
2121 },
32a84bcf
SS
2122 },
2123 {
2124 'url': 'https://shooshtime.com/videos/284002/just-out-of-the-shower-joi/',
2125 'md5': 'e2f0a4c329f7986280b7328e24036d60',
2126 'info_dict': {
2127 'id': '284002',
2128 'display_id': 'just-out-of-the-shower-joi',
2129 'ext': 'mp4',
2130 'title': 'Just Out Of The Shower JOI - Shooshtime',
2131 'thumbnail': 'https://i.shoosh.co/contents/videos_screenshots/284000/284002/preview.mp4.jpg',
2132 'height': 720,
2133 'age_limit': 18,
2134 },
2135 },
93e7c699 2136 {
2137 'note': 'Live HLS direct link',
2138 'url': 'https://d18j67ugtrocuq.cloudfront.net/out/v1/2767aec339144787926bd0322f72c6e9/index.m3u8',
2139 'info_dict': {
2140 'id': 'index',
2141 'title': r're:index',
2142 'ext': 'mp4',
2143 'live_status': 'is_live',
2144 },
2145 'params': {
2146 'skip_download': 'm3u8',
2147 },
2148 },
2149 {
2150 'note': 'Video.js VOD HLS',
2151 'url': 'https://gist.githubusercontent.com/bashonly/2aae0862c50f4a4b84f220c315767208/raw/e3380d413749dabbe804c9c2d8fd9a45142475c7/videojs_hls_test.html',
2152 'info_dict': {
2153 'id': 'videojs_hls_test',
2154 'title': 'video',
2155 'ext': 'mp4',
2156 'age_limit': 0,
2157 'duration': 1800,
2158 },
2159 'params': {
2160 'skip_download': 'm3u8',
2161 },
2162 },
cfe50f04 2163 ]
9b122384 2164
9b122384
PH
2165 def report_following_redirect(self, new_url):
2166 """Report information extraction."""
79649588 2167 self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
9b122384 2168
8f97a15d 2169 def report_detected(self, name, num=1, note=None):
2170 if num > 1:
2171 name += 's'
2172 elif not num:
2173 return
2174 else:
2175 num = 'a'
2176
2177 self._downloader.write_debug(f'Identified {num} {name}{format_field(note, None, "; %s")}')
aa9369a2 2178
c2e0fc40 2179 def _extra_manifest_info(self, info, manifest_url):
5cc0a8fd 2180 fragment_query = self._configuration_arg('fragment_query', [None], casesense=True)[0]
2181 if fragment_query is not None:
5cc0a8fd 2182 info['extra_param_to_segment_url'] = (
2183 urllib.parse.urlparse(fragment_query).query or fragment_query
2184 or urllib.parse.urlparse(manifest_url).query or None)
c2e0fc40 2185
2186 hex_or_none = lambda x: x if re.fullmatch(r'(0x)?[\da-f]+', x, re.IGNORECASE) else None
5cc0a8fd 2187 info['hls_aes'] = traverse_obj(self._configuration_arg('hls_key', casesense=True), {
c2e0fc40 2188 'uri': (0, {url_or_none}), 'key': (0, {hex_or_none}), 'iv': (1, {hex_or_none}),
2189 }) or None
2190
5cc0a8fd 2191 variant_query = self._configuration_arg('variant_query', [None], casesense=True)[0]
2192 if variant_query is not None:
2193 query = urllib.parse.parse_qs(
2194 urllib.parse.urlparse(variant_query).query or variant_query
2195 or urllib.parse.urlparse(manifest_url).query)
c2e0fc40 2196 for fmt in self._downloader._get_formats(info):
2197 fmt['url'] = update_url_query(fmt['url'], query)
3b021eac 2198
93e7c699 2199 # Attempt to detect live HLS or set VOD duration
2200 m3u8_format = next((f for f in self._downloader._get_formats(info)
2201 if determine_protocol(f) == 'm3u8_native'), None)
2202 if m3u8_format:
2203 is_live = self._configuration_arg('is_live', [None])[0]
2204 if is_live is not None:
2205 info['live_status'] = 'not_live' if is_live == 'false' else 'is_live'
2206 return
2207 headers = m3u8_format.get('http_headers') or info.get('http_headers')
2208 duration = self._extract_m3u8_vod_duration(
2209 m3u8_format['url'], info.get('id'), note='Checking m3u8 live status',
2210 errnote='Failed to download m3u8 media playlist', headers=headers)
2211 if not duration:
2212 info['live_status'] = 'is_live'
2213 info['duration'] = info.get('duration') or duration
2214
4fc946b5 2215 def _extract_rss(self, url, video_id, doc):
29f7c58a 2216 NS_MAP = {
2217 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
2218 }
2219
76c73715
PH
2220 entries = []
2221 for it in doc.findall('./channel/item'):
d6bf1161 2222 next_url = next(
2223 (e.attrib.get('url') for e in it.findall('./enclosure')),
2224 xpath_text(it, 'link', fatal=False))
76c73715
PH
2225 if not next_url:
2226 continue
2227
d6bf1161 2228 guid = try_call(lambda: it.find('guid').text)
2229 if guid:
2230 next_url = smuggle_url(next_url, {'force_videoid': guid})
2068a603 2231
29f7c58a 2232 def itunes(key):
d6bf1161 2233 return xpath_text(it, xpath_with_ns(f'./itunes:{key}', NS_MAP), default=None)
29f7c58a 2234
76c73715 2235 entries.append({
413c1f8e 2236 '_type': 'url_transparent',
76c73715 2237 'url': next_url,
d6bf1161 2238 'title': try_call(lambda: it.find('title').text),
29f7c58a 2239 'description': xpath_text(it, 'description', default=None),
d6bf1161 2240 'timestamp': unified_timestamp(xpath_text(it, 'pubDate', default=None)),
2241 'duration': parse_duration(itunes('duration')),
29f7c58a 2242 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
2243 'episode': itunes('title'),
2244 'episode_number': int_or_none(itunes('episode')),
2245 'season_number': int_or_none(itunes('season')),
d6bf1161 2246 'age_limit': {'true': 18, 'yes': 18, 'false': 0, 'no': 0}.get((itunes('explicit') or '').lower()),
76c73715 2247 })
4fc946b5
PH
2248
2249 return {
2250 '_type': 'playlist',
2251 'id': url,
d6bf1161 2252 'title': try_call(lambda: doc.find('./channel/title').text),
2253 'description': try_call(lambda: doc.find('./channel/description').text),
4fc946b5
PH
2254 'entries': entries,
2255 }
2256
32a84bcf
SS
2257 @classmethod
2258 def _kvs_get_real_url(cls, video_url, license_code):
a318f59d 2259 if not video_url.startswith('function/0/'):
2260 return video_url # not obfuscated
2261
32a84bcf
SS
2262 parsed = urllib.parse.urlparse(video_url[len('function/0/'):])
2263 license = cls._kvs_get_license_token(license_code)
2264 urlparts = parsed.path.split('/')
a318f59d 2265
32a84bcf
SS
2266 HASH_LENGTH = 32
2267 hash = urlparts[3][:HASH_LENGTH]
2268 indices = list(range(HASH_LENGTH))
a318f59d 2269
32a84bcf
SS
2270 # Swap indices of hash according to the destination calculated from the license token
2271 accum = 0
2272 for src in reversed(range(HASH_LENGTH)):
2273 accum += license[src]
2274 dest = (src + accum) % HASH_LENGTH
2275 indices[src], indices[dest] = indices[dest], indices[src]
a318f59d 2276
32a84bcf
SS
2277 urlparts[3] = ''.join(hash[index] for index in indices) + urlparts[3][HASH_LENGTH:]
2278 return urllib.parse.urlunparse(parsed._replace(path='/'.join(urlparts)))
a318f59d 2279
32a84bcf
SS
2280 @staticmethod
2281 def _kvs_get_license_token(license):
2282 license = license.replace('$', '')
2283 license_values = [int(char) for char in license]
2284
2285 modlicense = license.replace('0', '1')
2286 center = len(modlicense) // 2
a318f59d 2287 fronthalf = int(modlicense[:center + 1])
2288 backhalf = int(modlicense[center:])
32a84bcf
SS
2289 modlicense = str(4 * abs(fronthalf - backhalf))[:center + 1]
2290
2291 return [
2292 (license_values[index + offset] + current) % 10
2293 for index, current in enumerate(map(int, modlicense))
2294 for offset in range(4)
2295 ]
2296
2297 def _extract_kvs(self, url, webpage, video_id):
2298 flashvars = self._search_json(
2299 r'(?s:<script\b[^>]*>.*?var\s+flashvars\s*=)',
2300 webpage, 'flashvars', video_id, transform_source=js_to_json)
2301
2302 # extract the part after the last / as the display_id from the
2303 # canonical URL.
2304 display_id = self._search_regex(
2305 r'(?:<link href="https?://[^"]+/(.+?)/?" rel="canonical"\s*/?>'
2306 r'|<link rel="canonical" href="https?://[^"]+/(.+?)/?"\s*/?>)',
2307 webpage, 'display_id', fatal=False)
2308 title = self._html_search_regex(r'<(?:h1|title)>(?:Video: )?(.+?)</(?:h1|title)>', webpage, 'title')
2309
2310 thumbnail = flashvars['preview_url']
2311 if thumbnail.startswith('//'):
2312 protocol, _, _ = url.partition('/')
2313 thumbnail = protocol + thumbnail
a318f59d 2314
32a84bcf
SS
2315 url_keys = list(filter(re.compile(r'^video_(?:url|alt_url\d*)$').match, flashvars.keys()))
2316 formats = []
2317 for key in url_keys:
2318 if '/get_file/' not in flashvars[key]:
2319 continue
2320 format_id = flashvars.get(f'{key}_text', key)
2321 formats.append({
2322 'url': urljoin(url, self._kvs_get_real_url(flashvars[key], flashvars['license_code'])),
2323 'format_id': format_id,
2324 'ext': 'mp4',
2325 **(parse_resolution(format_id) or parse_resolution(flashvars[key])),
2326 'http_headers': {'Referer': url},
2327 })
2328 if not formats[-1].get('height'):
2329 formats[-1]['quality'] = 1
2330
2331 return {
2332 'id': flashvars['video_id'],
2333 'display_id': display_id,
2334 'title': title,
53675852 2335 'thumbnail': urljoin(url, thumbnail),
32a84bcf
SS
2336 'formats': formats,
2337 }
a318f59d 2338
9b122384 2339 def _real_extract(self, url):
ebd3c7b3 2340 if url.startswith('//'):
d226c560 2341 return self.url_result(self.http_scheme() + url)
ebd3c7b3 2342
14f25df2 2343 parsed_url = urllib.parse.urlparse(url)
a7130543 2344 if not parsed_url.scheme:
a06916d9 2345 default_search = self.get_param('default_search')
04b4d394 2346 if default_search is None:
1f7ccb90 2347 default_search = 'fixup_error'
04b4d394 2348
1f7ccb90 2349 if default_search in ('auto', 'auto_warning', 'fixup_error'):
9c1da4a9 2350 if re.match(r'^[^\s/]+\.[^\s/]+/', url):
6a39ee13 2351 self.report_warning('The url doesn\'t specify the protocol, trying with http')
04b4d394 2352 return self.url_result('http://' + url)
1f7ccb90 2353 elif default_search != 'fixup_error':
9c1fc022 2354 if default_search == 'auto_warning':
0e67ab0d
PH
2355 if re.match(r'^(?:url|URL)$', url):
2356 raise ExtractorError(
7a5c1cfe 2357 'Invalid URL: %r . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url,
0e67ab0d
PH
2358 expected=True)
2359 else:
6a39ee13 2360 self.report_warning(
7571c02c 2361 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
04b4d394 2362 return self.url_result('ytsearch:' + url)
1f7ccb90
PH
2363
2364 if default_search in ('error', 'fixup_error'):
7571c02c 2365 raise ExtractorError(
b74e86f4 2366 '%r is not a valid URL. '
7a5c1cfe 2367 'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%s" ) to search YouTube'
b74e86f4 2368 % (url, url), expected=True)
04b4d394 2369 else:
f2f2c0c2
PH
2370 if ':' not in default_search:
2371 default_search += ':'
04b4d394 2372 return self.url_result(default_search + url)
4d54ef20 2373
ade1fa70 2374 original_url = url
3166e684 2375 url, smuggled_data = unsmuggle_url(url, {})
4d54ef20 2376 force_videoid = None
2fa669f7 2377 is_intentional = smuggled_data.get('to_generic')
2378 if 'force_videoid' in smuggled_data:
4d54ef20
PH
2379 force_videoid = smuggled_data['force_videoid']
2380 video_id = force_videoid
2381 else:
9dcd6fd3 2382 video_id = self._generic_id(url)
3d83a1ae 2383
61544381 2384 # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
2385 # making it impossible to download only chunk of the file (yet we need only 512kB to
2386 # test whether it's HTML or not). According to yt-dlp default Accept-Encoding
2387 # that will always result in downloading the whole file that is not desirable.
2388 # Therefore for extraction pass we have to override Accept-Encoding to any in order
2389 # to accept raw bytes and being able to download only a chunk.
2390 # It may probably better to solve this by checking Content-Type for application/octet-stream
2391 # after a HEAD request, but not sure if we can rely on this.
f04b5bed 2392 full_response = self._request_webpage(url, video_id, headers=filter_dict({
3e01ce74 2393 'Accept-Encoding': 'identity',
f04b5bed 2394 'Referer': smuggled_data.get('referer'),
2395 }))
3d2623a8 2396 new_url = full_response.url
8e9fe43c 2397 url = urllib.parse.urlparse(url)._replace(scheme=urllib.parse.urlparse(new_url).scheme).geturl()
2398 if new_url != extract_basic_auth(url)[0]:
61544381 2399 self.report_following_redirect(new_url)
2400 if force_videoid:
2401 new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
2402 return self.url_result(new_url)
23be51d8 2403
f930e0c7
S
2404 info_dict = {
2405 'id': video_id,
9dcd6fd3 2406 'title': self._generic_title(url),
61544381 2407 'timestamp': unified_timestamp(full_response.headers.get('Last-Modified'))
f930e0c7
S
2408 }
2409
23be51d8 2410 # Check for direct link to a video
61544381 2411 content_type = full_response.headers.get('Content-Type', '').lower()
263eff95 2412 m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
23be51d8 2413 if m:
aa9369a2 2414 self.report_detected('direct video link')
f04b5bed 2415 headers = filter_dict({'Referer': smuggled_data.get('referer')})
14f25df2 2416 format_id = str(m.group('format_id'))
4ce2f29a 2417 ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
c26326c1 2418 subtitles = {}
b38cae49 2419 if format_id.endswith('mpegurl') or ext == 'm3u8':
3166e684 2420 formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
b38cae49 2421 elif format_id.endswith('mpd') or format_id.endswith('dash+xml') or ext == 'mpd':
3166e684 2422 formats, subtitles = self._extract_mpd_formats_and_subtitles(url, video_id, headers=headers)
b38cae49 2423 elif format_id == 'f4m' or ext == 'f4m':
3166e684 2424 formats = self._extract_f4m_formats(url, video_id, headers=headers)
eadc3ccd 2425 else:
2426 formats = [{
4e363703 2427 'format_id': format_id,
eadc3ccd 2428 'url': url,
4ce2f29a 2429 'ext': ext,
eadc3ccd 2430 'vcodec': 'none' if m.group('type') == 'audio' else None
2431 }]
de6c51e8 2432 info_dict['direct'] = True
3166e684 2433 info_dict.update({
2434 'formats': formats,
2435 'subtitles': subtitles,
3cf50fa8 2436 'http_headers': headers or None,
3166e684 2437 })
c2e0fc40 2438 self._extra_manifest_info(info_dict, url)
f930e0c7 2439 return info_dict
42393ce2 2440
a06916d9 2441 if not self.get_param('test', False) and not is_intentional:
2442 force = self.get_param('force_generic_extractor', False)
8f97a15d 2443 self.report_warning('%s generic information extractor' % ('Forcing' if force else 'Falling back on'))
d6e6a422 2444
5940862d
S
2445 first_bytes = full_response.read(512)
2446
2447 # Is it an M3U playlist?
0d769bcb 2448 if first_bytes.startswith(b'#EXTM3U'):
aa9369a2 2449 self.report_detected('M3U playlist')
da1c94ee 2450 info_dict['formats'], info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
c2e0fc40 2451 self._extra_manifest_info(info_dict, url)
5940862d
S
2452 return info_dict
2453
4e262a88
PH
2454 # Maybe it's a direct link to a video?
2455 # Be careful not to download the whole thing!
61ca9a80 2456 if not is_html(first_bytes):
6a39ee13 2457 self.report_warning(
4e262a88 2458 'URL could be a direct video link, returning it as such.')
f930e0c7 2459 info_dict.update({
4e262a88
PH
2460 'direct': True,
2461 'url': url,
f930e0c7
S
2462 })
2463 return info_dict
4e262a88
PH
2464
2465 webpage = self._webpage_read_content(
2466 full_response, url, video_id, prefix=first_bytes)
2467
2181983a 2468 if '<title>DPG Media Privacy Gate</title>' in webpage:
2469 webpage = self._download_webpage(url, video_id)
2470
9b122384 2471 self.report_extraction(video_id)
887c6acd 2472
1b840245 2473 # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
4fc946b5 2474 try:
61241abb 2475 try:
2476 doc = compat_etree_fromstring(webpage)
f9934b96 2477 except xml.etree.ElementTree.ParseError:
61241abb 2478 doc = compat_etree_fromstring(webpage.encode('utf-8'))
4fc946b5 2479 if doc.tag == 'rss':
aa9369a2 2480 self.report_detected('RSS feed')
4fc946b5 2481 return self._extract_rss(url, video_id, doc)
cc99a77a 2482 elif doc.tag == 'SmoothStreamingMedia':
7a450a3b 2483 info_dict['formats'], info_dict['subtitles'] = self._parse_ism_formats_and_subtitles(doc, url)
aa9369a2 2484 self.report_detected('ISM manifest')
cc99a77a 2485 return info_dict
e5e8d20a 2486 elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
19dbaeec 2487 smil = self._parse_smil(doc, url, video_id)
aa9369a2 2488 self.report_detected('SMIL file')
19dbaeec 2489 return smil
729accb4 2490 elif doc.tag == '{http://xspf.org/ns/0/}playlist':
aa9369a2 2491 self.report_detected('XSPF playlist')
96b8b9ab 2492 return self.playlist_result(
47a5cb77
S
2493 self._parse_xspf(
2494 doc, video_id, xspf_url=url,
3d2623a8 2495 xspf_base_url=full_response.url),
96b8b9ab 2496 video_id)
1b840245 2497 elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
7de27caf 2498 info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles(
d3f8b76b 2499 doc,
3d2623a8 2500 mpd_base_url=full_response.url.rpartition('/')[0],
86f4d14f 2501 mpd_url=url)
c2e0fc40 2502 self._extra_manifest_info(info_dict, url)
aa9369a2 2503 self.report_detected('DASH manifest')
f930e0c7
S
2504 return info_dict
2505 elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
2506 info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
aa9369a2 2507 self.report_detected('F4M manifest')
f930e0c7 2508 return info_dict
f9934b96 2509 except xml.etree.ElementTree.ParseError:
4fc946b5
PH
2510 pass
2511
8f97a15d 2512 info_dict.update({
2513 # it's tempting to parse this further, but you would
2514 # have to take into account all the variations like
2515 # Video Title - Site Name
2516 # Site Name | Video Title
2517 # Video Title - Tagline | Site Name
2518 # and so on and so forth; it's just not practical
62b8dac4 2519 'title': self._generic_title('', webpage, default='video'),
8f97a15d 2520 'description': self._og_search_description(webpage, default=None),
2521 'thumbnail': self._og_search_thumbnail(webpage, default=None),
2522 'age_limit': self._rta_search(webpage),
2523 })
2524
ade1fa70 2525 self._downloader.write_debug('Looking for embeds')
2526 embeds = list(self._extract_embeds(original_url, webpage, urlh=full_response, info_dict=info_dict))
2527 if len(embeds) == 1:
994f7ef8 2528 return merge_dicts(embeds[0], info_dict)
ade1fa70 2529 elif embeds:
2530 return self.playlist_result(embeds, **info_dict)
2531 raise UnsupportedError(url)
2532
2533 def _extract_embeds(self, url, webpage, *, urlh=None, info_dict={}):
2534 """Returns an iterator of video entries"""
2535 info_dict = types.MappingProxyType(info_dict) # Prevents accidental mutation
2536 video_id = traverse_obj(info_dict, 'display_id', 'id') or self._generic_id(url)
2537 url, smuggled_data = unsmuggle_url(url, {})
3d2623a8 2538 actual_url = urlh.url if urlh else url
8f97a15d 2539
14390730 2540 # Sometimes embedded video player is hidden behind percent encoding
067aa17e 2541 # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448)
14390730 2542 # Unescaping the whole page allows to handle those cases in a generic way
29f7c58a 2543 # FIXME: unescaping the whole page may break URLs, commenting out for now.
2544 # There probably should be a second run of generic extractor on unescaped webpage.
14f25df2 2545 # webpage = urllib.parse.unquote(webpage)
1f7659db 2546
8f97a15d 2547 embeds = []
2516cafb 2548 for ie in self._downloader._ies.values():
ade1fa70 2549 if ie.ie_key() in smuggled_data.get('block_ies', []):
2550 continue
8f97a15d 2551 gen = ie.extract_from_webpage(self._downloader, url, webpage)
2552 current_embeds = []
2553 try:
2554 while True:
2555 current_embeds.append(next(gen))
2556 except self.StopExtraction:
2557 self.report_detected(f'{ie.IE_NAME} exclusive embed', len(current_embeds),
2558 embeds and 'discarding other embeds')
ade1fa70 2559 return current_embeds
8f97a15d 2560 except StopIteration:
2561 self.report_detected(f'{ie.IE_NAME} embed', len(current_embeds))
2562 embeds.extend(current_embeds)
2563
ade1fa70 2564 if embeds:
2565 return embeds
b801cd71 2566
c73e330e
RU
2567 jwplayer_data = self._find_jwplayer_data(
2568 webpage, video_id, transform_source=js_to_json)
2569 if jwplayer_data:
5e7bbac3 2570 if isinstance(jwplayer_data.get('playlist'), str):
aa9369a2 2571 self.report_detected('JW Player playlist')
ade1fa70 2572 return [self.url_result(jwplayer_data['playlist'], 'JWPlatform')]
3d08f63d
MYM
2573 try:
2574 info = self._parse_jwplayer_data(
2575 jwplayer_data, video_id, require_title=False, base_url=url)
4e4982ab 2576 if traverse_obj(info, 'formats', ('entries', ..., 'formats')):
2577 self.report_detected('JW Player data')
ade1fa70 2578 return [info]
3d08f63d 2579 except ExtractorError:
067aa17e 2580 # See https://github.com/ytdl-org/youtube-dl/pull/16735
3d08f63d 2581 pass
a4a554a7 2582
63d990d2
S
2583 # Video.js embed
2584 mobj = re.search(
c2d2ee40 2585 r'(?s)\bvideojs\s*\(.+?([a-zA-Z0-9_$]+)\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
63d990d2
S
2586 webpage)
2587 if mobj is not None:
c2d2ee40 2588 varname = mobj.group(1)
d5d1df8a 2589 sources = variadic(self._parse_json(
2590 mobj.group(2), video_id, transform_source=js_to_json, fatal=False) or [])
93e7c699 2591 formats, subtitles, src = [], {}, None
63d990d2 2592 for source in sources:
e0b6e988 2593 src = source.get('src')
14f25df2 2594 if not src or not isinstance(src, str):
63d990d2 2595 continue
14f25df2 2596 src = urllib.parse.urljoin(url, src)
63d990d2 2597 src_type = source.get('type')
14f25df2 2598 if isinstance(src_type, str):
63d990d2
S
2599 src_type = src_type.lower()
2600 ext = determine_ext(src).lower()
2601 if src_type == 'video/youtube':
ade1fa70 2602 return [self.url_result(src, YoutubeIE.ie_key())]
63d990d2 2603 if src_type == 'application/dash+xml' or ext == 'mpd':
da1c94ee
F
2604 fmts, subs = self._extract_mpd_formats_and_subtitles(
2605 src, video_id, mpd_id='dash', fatal=False)
2606 formats.extend(fmts)
2607 self._merge_subtitles(subs, target=subtitles)
63d990d2 2608 elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
da1c94ee 2609 fmts, subs = self._extract_m3u8_formats_and_subtitles(
63d990d2 2610 src, video_id, 'mp4', entry_protocol='m3u8_native',
da1c94ee
F
2611 m3u8_id='hls', fatal=False)
2612 formats.extend(fmts)
2613 self._merge_subtitles(subs, target=subtitles)
3b021eac 2614
2615 if not formats:
63d990d2
S
2616 formats.append({
2617 'url': src,
3089bc74
S
2618 'ext': (mimetype2ext(src_type)
2619 or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
b73612a2 2620 'http_headers': {
ade1fa70 2621 'Referer': actual_url,
b73612a2 2622 },
63d990d2 2623 })
c2d2ee40
LNO
2624 # https://docs.videojs.com/player#addRemoteTextTrack
2625 # https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
2626 for sub_match in re.finditer(rf'(?s){re.escape(varname)}' r'\.addRemoteTextTrack\(({.+?})\s*,\s*(?:true|false)\)', webpage):
2627 sub = self._parse_json(
2628 sub_match.group(1), video_id, transform_source=js_to_json, fatal=False) or {}
93e7c699 2629 sub_src = str_or_none(sub.get('src'))
2630 if not sub_src:
c2d2ee40
LNO
2631 continue
2632 subtitles.setdefault(dict_get(sub, ('language', 'srclang')) or 'und', []).append({
93e7c699 2633 'url': urllib.parse.urljoin(url, sub_src),
c2d2ee40
LNO
2634 'name': sub.get('label'),
2635 'http_headers': {
ade1fa70 2636 'Referer': actual_url,
c2d2ee40
LNO
2637 },
2638 })
da1c94ee 2639 if formats or subtitles:
aa9369a2 2640 self.report_detected('video.js embed')
93e7c699 2641 info_dict = {'formats': formats, 'subtitles': subtitles}
2642 if formats:
2643 self._extra_manifest_info(info_dict, src)
2644 return [info_dict]
63d990d2 2645
32a84bcf
SS
2646 # Look for generic KVS player (before json-ld bc of some urls that break otherwise)
2647 found = self._search_regex((
8aa0bd5d 2648 r'<script\b[^>]+?\bsrc\s*=\s*(["\'])https?://(?:(?!\1)[^?#])+/kt_player\.js\?v=(?P<ver>\d+(?:\.\d+)+)\1[^>]*>',
2649 r'kt_player\s*\(\s*(["\'])(?:(?!\1)[\w\W])+\1\s*,\s*(["\'])https?://(?:(?!\2)[^?#])+/kt_player\.swf\?v=(?P<ver>\d+(?:\.\d+)+)\2\s*,',
32a84bcf
SS
2650 ), webpage, 'KVS player', group='ver', default=False)
2651 if found:
8aa0bd5d 2652 self.report_detected('KVS Player')
32a84bcf
SS
2653 if found.split('.')[0] not in ('4', '5', '6'):
2654 self.report_warning(f'Untested major version ({found}) in player engine - download may fail.')
2655 return [self._extract_kvs(url, webpage, video_id)]
2656
ff17be3a 2657 # Looking for http://schema.org/VideoObject
fa0b816e 2658 json_ld = self._search_json_ld(webpage, video_id, default={})
85553414 2659 if json_ld.get('url') not in (url, None):
aa9369a2 2660 self.report_detected('JSON LD')
ed027fd9 2661 is_direct = json_ld.get('ext') not in (None, *MEDIA_EXTENSIONS.manifests)
ade1fa70 2662 return [merge_dicts({
ed027fd9 2663 '_type': 'video' if is_direct else 'url_transparent',
3166e684 2664 'url': smuggle_url(json_ld['url'], {
2665 'force_videoid': video_id,
2666 'to_generic': True,
f04b5bed 2667 'referer': url,
3166e684 2668 }),
ade1fa70 2669 }, json_ld)]
ff17be3a 2670
ced659bb 2671 def check_video(vurl):
a0f71985
PH
2672 if YoutubeIE.suitable(vurl):
2673 return True
b7a8c1bc
S
2674 if RtmpIE.suitable(vurl):
2675 return True
14f25df2 2676 vpath = urllib.parse.urlparse(vurl).path
a44ca5a4 2677 vext = determine_ext(vpath, None)
2678 return vext not in (None, 'swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
ced659bb
S
2679
2680 def filter_video(urls):
2681 return list(filter(check_video, urls))
2682
9b122384 2683 # Start with something easy: JW Player in SWFObject
ced659bb 2684 found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
aa9369a2 2685 if found:
2686 self.report_detected('JW Player in SFWObject')
2687 else:
d981cef6 2688 # Look for gorilla-vid style embedding
ced659bb 2689 found = filter_video(re.findall(r'''(?sx)
c0292e8a
PH
2690 (?:
2691 jw_plugins|
2692 JWPlayerOptions|
2693 jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
2694 )
a0f71985
PH
2695 .*?
2696 ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
aa9369a2 2697 if found:
2698 self.report_detected('JW Player embed')
b30b8698 2699 if not found:
9b122384 2700 # Broaden the search a little bit
ced659bb 2701 found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
aa9369a2 2702 if found:
2703 self.report_detected('video file')
b30b8698
PH
2704 if not found:
2705 # Broaden the findall a little bit: JWPlayer JS loader
ced659bb 2706 found = filter_video(re.findall(
54a9328b 2707 r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
aa9369a2 2708 if found:
2709 self.report_detected('JW Player JS loader')
4d805e06
PH
2710 if not found:
2711 # Flow player
ced659bb 2712 found = filter_video(re.findall(r'''(?xs)
4d805e06
PH
2713 flowplayer\("[^"]+",\s*
2714 \{[^}]+?\}\s*,
52585fd6 2715 \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
4d805e06 2716 ["']?url["']?\s*:\s*["']([^"']+)["']
ced659bb 2717 ''', webpage))
aa9369a2 2718 if found:
2719 self.report_detected('Flow Player')
501f13fb
PH
2720 if not found:
2721 # Cinerama player
2722 found = re.findall(
2723 r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
aa9369a2 2724 if found:
2725 self.report_detected('Cinerama player')
b30b8698 2726 if not found:
9b122384 2727 # Try to find twitter cards info
371ddb14
S
2728 # twitter:player:stream should be checked before twitter:player since
2729 # it is expected to contain a raw stream (see
2730 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
ced659bb
S
2731 found = filter_video(re.findall(
2732 r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
aa9369a2 2733 if found:
2734 self.report_detected('Twitter card')
b30b8698 2735 if not found:
9b122384 2736 # We look for Open Graph info:
62b58c09 2737 # We have to match any number spaces between elements, some sites try to align them, e.g.: statigr.am
b30b8698 2738 m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
9b122384
PH
2739 # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
2740 if m_video_type is not None:
b73612a2 2741 found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
aa9369a2 2742 if found:
2743 self.report_detected('Open Graph video info')
b30b8698 2744 if not found:
ed9a25dd 2745 REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
a5a45015 2746 found = re.search(
89ef304b 2747 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
ed9a25dd 2748 r'(?:[a-z-]+="[^"]+"\s+)*?content="%s' % REDIRECT_REGEX,
89ef304b 2749 webpage)
84f81016
S
2750 if not found:
2751 # Look also in Refresh HTTP header
ade1fa70 2752 refresh_header = urlh and urlh.headers.get('Refresh')
84f81016 2753 if refresh_header:
ed9a25dd 2754 found = re.search(REDIRECT_REGEX, refresh_header)
b30b8698 2755 if found:
14f25df2 2756 new_url = urllib.parse.urljoin(url, unescapeHTML(found.group(1)))
54b960f3
S
2757 if new_url != url:
2758 self.report_following_redirect(new_url)
ade1fa70 2759 return [self.url_result(new_url)]
54b960f3
S
2760 else:
2761 found = None
371ddb14
S
2762
2763 if not found:
2764 # twitter:player is a https URL to iframe player that may or may not
7a5c1cfe 2765 # be supported by yt-dlp thus this is checked the very last (see
371ddb14
S
2766 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
2767 embed_url = self._html_search_meta('twitter:player', webpage, default=None)
02d01e15 2768 if embed_url and embed_url != url:
aa9369a2 2769 self.report_detected('twitter:player iframe')
ade1fa70 2770 return [self.url_result(embed_url)]
371ddb14 2771
b30b8698 2772 if not found:
ade1fa70 2773 return []
2774
2775 domain_name = self._search_regex(r'^(?:https?://)?([^/]*)/.*', url, 'video uploader', default=None)
9b122384 2776
b30b8698 2777 entries = []
4a120778 2778 for video_url in orderedSet(found):
05997b6e 2779 video_url = video_url.encode().decode('unicode-escape')
949b6497 2780 video_url = unescapeHTML(video_url)
6cc37c69 2781 video_url = video_url.replace('\\/', '/')
14f25df2 2782 video_url = urllib.parse.urljoin(url, video_url)
2783 video_id = urllib.parse.unquote(os.path.basename(video_url))
9b122384 2784
b30b8698
PH
2785 # Sometimes, jwplayer extraction will result in a YouTube URL
2786 if YoutubeIE.suitable(video_url):
2787 entries.append(self.url_result(video_url, 'Youtube'))
2788 continue
9b122384 2789
b30b8698 2790 video_id = os.path.splitext(video_id)[0]
3f4faff7 2791 headers = {
ade1fa70 2792 'referer': actual_url
3f4faff7 2793 }
fc9713a1 2794
28602e74
YCH
2795 entry_info_dict = {
2796 'id': video_id,
bfd973ec 2797 'uploader': domain_name,
2798 'title': info_dict['title'],
2799 'age_limit': info_dict['age_limit'],
3f4faff7 2800 'http_headers': headers,
28602e74
YCH
2801 }
2802
5620f840
S
2803 if RtmpIE.suitable(video_url):
2804 entry_info_dict.update({
2805 '_type': 'url_transparent',
2806 'ie_key': RtmpIE.ie_key(),
2807 'url': video_url,
2808 })
2809 entries.append(entry_info_dict)
2810 continue
2811
729accb4
S
2812 ext = determine_ext(video_url)
2813 if ext == 'smil':
da1c94ee 2814 entry_info_dict = {**self._extract_smil_info(video_url, video_id), **entry_info_dict}
729accb4 2815 elif ext == 'xspf':
ade1fa70 2816 return [self._extract_xspf_playlist(video_url, video_id)]
750b9ff0 2817 elif ext == 'm3u8':
3f4faff7 2818 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers)
c2e0fc40 2819 self._extra_manifest_info(entry_info_dict, video_url)
79a35085 2820 elif ext == 'mpd':
3f4faff7 2821 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers)
c2e0fc40 2822 self._extra_manifest_info(entry_info_dict, video_url)
3f2f4a94 2823 elif ext == 'f4m':
3f4faff7 2824 entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers)
4119a96c 2825 elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
26aae566
S
2826 # Just matching .ism/manifest is not enough to be reliably sure
2827 # whether it's actually an ISM manifest or some other streaming
2828 # manifest since there are various streaming URL formats
2829 # possible (see [1]) as well as some other shenanigans like
2830 # .smil/manifest URLs that actually serve an ISM (see [2]) and
2831 # so on.
2832 # Thus the most reasonable way to solve this is to delegate
2833 # to generic extractor in order to look into the contents of
2834 # the manifest itself.
2835 # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
2836 # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
2837 entry_info_dict = self.url_result(
2838 smuggle_url(video_url, {'to_generic': True}),
2839 GenericIE.ie_key())
d6fd958c 2840 else:
28602e74
YCH
2841 entry_info_dict['url'] = video_url
2842
2843 entries.append(entry_info_dict)
b30b8698 2844
ade1fa70 2845 if len(entries) > 1:
b30b8698 2846 for num, e in enumerate(entries, start=1):
13d8fbef
JMF
2847 # 'url' results don't have a title
2848 if e.get('title') is not None:
2849 e['title'] = '%s (%d)' % (e['title'], num)
ade1fa70 2850 return entries