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