]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/generic.py
[extractor/generic] Separate embed extraction into own function (#5176)
[yt-dlp.git] / yt_dlp / extractor / generic.py
1 import os
2 import re
3 import types
4 import urllib.parse
5 import xml.etree.ElementTree
6
7 from .common import InfoExtractor # isort: split
8 from .brightcove import BrightcoveLegacyIE, BrightcoveNewIE
9 from .commonprotocols import RtmpIE
10 from .youtube import YoutubeIE
11 from ..compat import compat_etree_fromstring
12 from ..utils import (
13 KNOWN_EXTENSIONS,
14 ExtractorError,
15 UnsupportedError,
16 determine_ext,
17 dict_get,
18 format_field,
19 int_or_none,
20 is_html,
21 js_to_json,
22 merge_dicts,
23 mimetype2ext,
24 orderedSet,
25 parse_duration,
26 parse_resolution,
27 smuggle_url,
28 str_or_none,
29 traverse_obj,
30 try_call,
31 unescapeHTML,
32 unified_timestamp,
33 unsmuggle_url,
34 url_or_none,
35 xpath_attr,
36 xpath_text,
37 xpath_with_ns,
38 )
39
40
41 class GenericIE(InfoExtractor):
42 IE_DESC = 'Generic downloader that works on some sites'
43 _VALID_URL = r'.*'
44 IE_NAME = 'generic'
45 _NETRC_MACHINE = False # Suppress username warning
46 _TESTS = [
47 # Direct link to a video
48 {
49 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
50 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
51 'info_dict': {
52 'id': 'trailer',
53 'ext': 'mp4',
54 'title': 'trailer',
55 'upload_date': '20100513',
56 }
57 },
58 # Direct link to media delivered compressed (until Accept-Encoding is *)
59 {
60 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
61 'md5': '128c42e68b13950268b648275386fc74',
62 'info_dict': {
63 'id': 'FictionJunction-Parallel_Hearts',
64 'ext': 'flac',
65 'title': 'FictionJunction-Parallel_Hearts',
66 'upload_date': '20140522',
67 },
68 'expected_warnings': [
69 'URL could be a direct video link, returning it as such.'
70 ],
71 'skip': 'URL invalid',
72 },
73 # Direct download with broken HEAD
74 {
75 'url': 'http://ai-radio.org:8000/radio.opus',
76 'info_dict': {
77 'id': 'radio',
78 'ext': 'opus',
79 'title': 'radio',
80 },
81 'params': {
82 'skip_download': True, # infinite live stream
83 },
84 'expected_warnings': [
85 r'501.*Not Implemented',
86 r'400.*Bad Request',
87 ],
88 },
89 # Direct link with incorrect MIME type
90 {
91 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
92 'md5': '4ccbebe5f36706d85221f204d7eb5913',
93 'info_dict': {
94 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
95 'id': '5_Lennart_Poettering_-_Systemd',
96 'ext': 'webm',
97 'title': '5_Lennart_Poettering_-_Systemd',
98 'upload_date': '20141120',
99 },
100 'expected_warnings': [
101 'URL could be a direct video link, returning it as such.'
102 ]
103 },
104 # RSS feed
105 {
106 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
107 'info_dict': {
108 'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
109 'title': 'Zero Punctuation',
110 'description': 're:.*groundbreaking video review series.*'
111 },
112 'playlist_mincount': 11,
113 },
114 # RSS feed with enclosure
115 {
116 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
117 'info_dict': {
118 'id': 'http://podcastfeeds.nbcnews.com/nbcnews/video/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
119 'title': 'MSNBC Rachel Maddow (video)',
120 'description': 're:.*her unique approach to storytelling.*',
121 },
122 'playlist': [{
123 'info_dict': {
124 'ext': 'mov',
125 'id': 'pdv_maddow_netcast_mov-12-03-2020-223726',
126 'title': 'MSNBC Rachel Maddow (video) - 12-03-2020-223726',
127 'description': 're:.*her unique approach to storytelling.*',
128 'upload_date': '20201204',
129 },
130 }],
131 },
132 # RSS feed with item with description and thumbnails
133 {
134 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
135 'info_dict': {
136 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
137 'title': 're:.*100% Hydrogen.*',
138 'description': 're:.*In this episode.*',
139 },
140 'playlist': [{
141 'info_dict': {
142 'ext': 'm4a',
143 'id': 'c1c879525ce2cb640b344507e682c36d',
144 'title': 're:Hydrogen!',
145 'description': 're:.*In this episode we are going.*',
146 'timestamp': 1567977776,
147 'upload_date': '20190908',
148 'duration': 459,
149 'thumbnail': r're:^https?://.*\.jpg$',
150 'episode_number': 1,
151 'season_number': 1,
152 'age_limit': 0,
153 'season': 'Season 1',
154 'direct': True,
155 'episode': 'Episode 1',
156 },
157 }],
158 'params': {
159 'skip_download': True,
160 },
161 },
162 # RSS feed with enclosures and unsupported link URLs
163 {
164 'url': 'http://www.hellointernet.fm/podcast?format=rss',
165 'info_dict': {
166 'id': 'http://www.hellointernet.fm/podcast?format=rss',
167 'description': 'CGP Grey and Brady Haran talk about YouTube, life, work, whatever.',
168 'title': 'Hello Internet',
169 },
170 'playlist_mincount': 100,
171 },
172 # RSS feed with guid
173 {
174 'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
175 'info_dict': {
176 'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
177 'description': 'md5:be809a44b63b0c56fb485caf68685520',
178 'title': 'The Little Red Podcast',
179 },
180 'playlist_mincount': 76,
181 },
182 # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
183 {
184 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
185 'info_dict': {
186 'id': 'smil',
187 'ext': 'mp4',
188 'title': 'Automatics, robotics and biocybernetics',
189 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
190 'upload_date': '20130627',
191 'formats': 'mincount:16',
192 'subtitles': 'mincount:1',
193 },
194 'params': {
195 'force_generic_extractor': True,
196 'skip_download': True,
197 },
198 },
199 # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
200 {
201 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
202 'info_dict': {
203 'id': 'hds',
204 'ext': 'flv',
205 'title': 'hds',
206 'formats': 'mincount:1',
207 },
208 'params': {
209 'skip_download': True,
210 },
211 },
212 # SMIL from https://www.restudy.dk/video/play/id/1637
213 {
214 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
215 'info_dict': {
216 'id': 'video_1637',
217 'ext': 'flv',
218 'title': 'video_1637',
219 'formats': 'mincount:3',
220 },
221 'params': {
222 'skip_download': True,
223 },
224 },
225 # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
226 {
227 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
228 'info_dict': {
229 'id': 'smil-service',
230 'ext': 'flv',
231 'title': 'smil-service',
232 'formats': 'mincount:1',
233 },
234 'params': {
235 'skip_download': True,
236 },
237 },
238 # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
239 {
240 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
241 'info_dict': {
242 'id': '4719370',
243 'ext': 'mp4',
244 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
245 'formats': 'mincount:3',
246 },
247 'params': {
248 'skip_download': True,
249 },
250 },
251 # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
252 {
253 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
254 'info_dict': {
255 'id': 'mZlp2ctYIUEB',
256 'ext': 'mp4',
257 'title': 'Tikibad ontruimd wegens brand',
258 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
259 'thumbnail': r're:^https?://.*\.jpg$',
260 'duration': 33,
261 },
262 'params': {
263 'skip_download': True,
264 },
265 },
266 # MPD from http://dash-mse-test.appspot.com/media.html
267 {
268 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
269 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
270 'info_dict': {
271 'id': 'car-20120827-manifest',
272 'ext': 'mp4',
273 'title': 'car-20120827-manifest',
274 'formats': 'mincount:9',
275 'upload_date': '20130904',
276 },
277 },
278 # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
279 {
280 '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',
281 'info_dict': {
282 'id': 'content',
283 'ext': 'mp4',
284 'title': 'content',
285 'formats': 'mincount:8',
286 },
287 'params': {
288 # m3u8 downloads
289 'skip_download': True,
290 },
291 'skip': 'video gone',
292 },
293 # m3u8 served with Content-Type: text/plain
294 {
295 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
296 'info_dict': {
297 'id': 'index',
298 'ext': 'mp4',
299 'title': 'index',
300 'upload_date': '20140720',
301 'formats': 'mincount:11',
302 },
303 'params': {
304 # m3u8 downloads
305 'skip_download': True,
306 },
307 'skip': 'video gone',
308 },
309 # google redirect
310 {
311 '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',
312 'info_dict': {
313 'id': 'cmQHVoWB5FY',
314 'ext': 'mp4',
315 'upload_date': '20130224',
316 'uploader_id': 'TheVerge',
317 'description': r're:^Chris Ziegler takes a look at the\.*',
318 'uploader': 'The Verge',
319 'title': 'First Firefox OS phones side-by-side',
320 },
321 'params': {
322 'skip_download': False,
323 }
324 },
325 {
326 # redirect in Refresh HTTP header
327 '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',
328 'info_dict': {
329 'id': 'pO8h3EaFRdo',
330 'ext': 'mp4',
331 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
332 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
333 'upload_date': '20150917',
334 'uploader_id': 'brtvofficial',
335 'uploader': 'Boiler Room',
336 },
337 'params': {
338 'skip_download': False,
339 },
340 },
341 {
342 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
343 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
344 'info_dict': {
345 'id': '13601338388002',
346 'ext': 'mp4',
347 'uploader': 'www.hodiho.fr',
348 'title': 'R\u00e9gis plante sa Jeep',
349 }
350 },
351 # bandcamp page with custom domain
352 {
353 'add_ie': ['Bandcamp'],
354 'url': 'http://bronyrock.com/track/the-pony-mash',
355 'info_dict': {
356 'id': '3235767654',
357 'ext': 'mp3',
358 'title': 'The Pony Mash',
359 'uploader': 'M_Pallante',
360 },
361 'skip': 'There is a limit of 200 free downloads / month for the test song',
362 },
363 {
364 # embedded brightcove video
365 # it also tests brightcove videos that need to set the 'Referer'
366 # in the http requests
367 'add_ie': ['BrightcoveLegacy'],
368 'url': 'http://www.bfmtv.com/video/bfmbusiness/cours-bourse/cours-bourse-l-analyse-technique-154522/',
369 'info_dict': {
370 'id': '2765128793001',
371 'ext': 'mp4',
372 'title': 'Le cours de bourse : l’analyse technique',
373 'description': 'md5:7e9ad046e968cb2d1114004aba466fd9',
374 'uploader': 'BFM BUSINESS',
375 },
376 'params': {
377 'skip_download': True,
378 },
379 },
380 {
381 # embedded with itemprop embedURL and video id spelled as `idVideo`
382 'add_id': ['BrightcoveLegacy'],
383 'url': 'http://bfmbusiness.bfmtv.com/mediaplayer/chroniques/olivier-delamarche/',
384 'info_dict': {
385 'id': '5255628253001',
386 'ext': 'mp4',
387 'title': 'md5:37c519b1128915607601e75a87995fc0',
388 'description': 'md5:37f7f888b434bb8f8cc8dbd4f7a4cf26',
389 'uploader': 'BFM BUSINESS',
390 'uploader_id': '876450612001',
391 'timestamp': 1482255315,
392 'upload_date': '20161220',
393 },
394 'params': {
395 'skip_download': True,
396 },
397 },
398 {
399 # https://github.com/ytdl-org/youtube-dl/issues/2253
400 'url': 'http://bcove.me/i6nfkrc3',
401 'md5': '0ba9446db037002366bab3b3eb30c88c',
402 'info_dict': {
403 'id': '3101154703001',
404 'ext': 'mp4',
405 'title': 'Still no power',
406 'uploader': 'thestar.com',
407 'description': 'Mississauga resident David Farmer is still out of power as a result of the ice storm a month ago. To keep the house warm, Farmer cuts wood from his property for a wood burning stove downstairs.',
408 },
409 'add_ie': ['BrightcoveLegacy'],
410 'skip': 'video gone',
411 },
412 {
413 'url': 'http://www.championat.com/video/football/v/87/87499.html',
414 'md5': 'fb973ecf6e4a78a67453647444222983',
415 'info_dict': {
416 'id': '3414141473001',
417 'ext': 'mp4',
418 'title': 'Видео. Удаление Дзагоева (ЦСКА)',
419 'description': 'Онлайн-трансляция матча ЦСКА - "Волга"',
420 'uploader': 'Championat',
421 },
422 },
423 {
424 # https://github.com/ytdl-org/youtube-dl/issues/3541
425 'add_ie': ['BrightcoveLegacy'],
426 'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
427 'info_dict': {
428 'id': '3866516442001',
429 'ext': 'mp4',
430 'title': 'Leer mij vrouwen kennen: Aflevering 1',
431 'description': 'Leer mij vrouwen kennen: Aflevering 1',
432 'uploader': 'SBS Broadcasting',
433 },
434 'skip': 'Restricted to Netherlands',
435 'params': {
436 'skip_download': True, # m3u8 download
437 },
438 },
439 {
440 # Brightcove video in <iframe>
441 'url': 'http://www.un.org/chinese/News/story.asp?NewsID=27724',
442 'md5': '36d74ef5e37c8b4a2ce92880d208b968',
443 'info_dict': {
444 'id': '5360463607001',
445 'ext': 'mp4',
446 'title': '叙利亚失明儿童在废墟上演唱《心跳》 呼吁获得正常童年生活',
447 'description': '联合国儿童基金会中东和北非区域大使、作曲家扎德·迪拉尼(Zade Dirani)在3月15日叙利亚冲突爆发7周年纪念日之际发布了为叙利亚谱写的歌曲《心跳》(HEARTBEAT),为受到六年冲突影响的叙利亚儿童发出强烈呐喊,呼吁世界做出共同努力,使叙利亚儿童重新获得享有正常童年生活的权利。',
448 'uploader': 'United Nations',
449 'uploader_id': '1362235914001',
450 'timestamp': 1489593889,
451 'upload_date': '20170315',
452 },
453 'add_ie': ['BrightcoveLegacy'],
454 },
455 {
456 # Brightcove with alternative playerID key
457 'url': 'http://www.nature.com/nmeth/journal/v9/n7/fig_tab/nmeth.2062_SV1.html',
458 'info_dict': {
459 'id': 'nmeth.2062_SV1',
460 'title': 'Simultaneous multiview imaging of the Drosophila syncytial blastoderm : Quantitative high-speed imaging of entire developing embryos with simultaneous multiview light-sheet microscopy : Nature Methods : Nature Research',
461 },
462 'playlist': [{
463 'info_dict': {
464 'id': '2228375078001',
465 'ext': 'mp4',
466 'title': 'nmeth.2062-sv1',
467 'description': 'nmeth.2062-sv1',
468 'timestamp': 1363357591,
469 'upload_date': '20130315',
470 'uploader': 'Nature Publishing Group',
471 'uploader_id': '1964492299001',
472 },
473 }],
474 },
475 {
476 # Brightcove with UUID in videoPlayer
477 'url': 'http://www8.hp.com/cn/zh/home.html',
478 'info_dict': {
479 'id': '5255815316001',
480 'ext': 'mp4',
481 'title': 'Sprocket Video - China',
482 'description': 'Sprocket Video - China',
483 'uploader': 'HP-Video Gallery',
484 'timestamp': 1482263210,
485 'upload_date': '20161220',
486 'uploader_id': '1107601872001',
487 },
488 'params': {
489 'skip_download': True, # m3u8 download
490 },
491 'skip': 'video rotates...weekly?',
492 },
493 {
494 # Brightcove:new type [2].
495 'url': 'http://www.delawaresportszone.com/video-st-thomas-more-earns-first-trip-to-basketball-semis',
496 'md5': '2b35148fcf48da41c9fb4591650784f3',
497 'info_dict': {
498 'id': '5348741021001',
499 'ext': 'mp4',
500 'upload_date': '20170306',
501 'uploader_id': '4191638492001',
502 'timestamp': 1488769918,
503 'title': 'VIDEO: St. Thomas More earns first trip to basketball semis',
504
505 },
506 },
507 {
508 # Alternative brightcove <video> attributes
509 'url': 'http://www.programme-tv.net/videos/extraits/81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche/',
510 'info_dict': {
511 'id': '81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche',
512 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche, Extraits : toutes les vidéos avec Télé-Loisirs",
513 },
514 'playlist': [{
515 'md5': '732d22ba3d33f2f3fc253c39f8f36523',
516 'info_dict': {
517 'id': '5311302538001',
518 'ext': 'mp4',
519 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche",
520 'description': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche (France 2, 5 février 2017)",
521 'timestamp': 1486321708,
522 'upload_date': '20170205',
523 'uploader_id': '800000640001',
524 },
525 'only_matching': True,
526 }],
527 },
528 {
529 # Brightcove with UUID in videoPlayer
530 'url': 'http://www8.hp.com/cn/zh/home.html',
531 'info_dict': {
532 'id': '5255815316001',
533 'ext': 'mp4',
534 'title': 'Sprocket Video - China',
535 'description': 'Sprocket Video - China',
536 'uploader': 'HP-Video Gallery',
537 'timestamp': 1482263210,
538 'upload_date': '20161220',
539 'uploader_id': '1107601872001',
540 },
541 'params': {
542 'skip_download': True, # m3u8 download
543 },
544 },
545 # ooyala video
546 {
547 'url': 'http://www.rollingstone.com/music/videos/norwegian-dj-cashmere-cat-goes-spartan-on-with-me-premiere-20131219',
548 'md5': '166dd577b433b4d4ebfee10b0824d8ff',
549 'info_dict': {
550 'id': 'BwY2RxaTrTkslxOfcan0UCf0YqyvWysJ',
551 'ext': 'mp4',
552 'title': '2cc213299525360.mov', # that's what we get
553 'duration': 238.231,
554 },
555 'add_ie': ['Ooyala'],
556 },
557 {
558 # ooyala video embedded with http://player.ooyala.com/iframe.js
559 'url': 'http://www.macrumors.com/2015/07/24/steve-jobs-the-man-in-the-machine-first-trailer/',
560 'info_dict': {
561 'id': 'p0MGJndjoG5SOKqO_hZJuZFPB-Tr5VgB',
562 'ext': 'mp4',
563 'title': '"Steve Jobs: Man in the Machine" trailer',
564 'description': 'The first trailer for the Alex Gibney documentary "Steve Jobs: Man in the Machine."',
565 'duration': 135.427,
566 },
567 'params': {
568 'skip_download': True,
569 },
570 'skip': 'movie expired',
571 },
572 # ooyala video embedded with http://player.ooyala.com/static/v4/production/latest/core.min.js
573 {
574 'url': 'http://wnep.com/2017/07/22/steampunk-fest-comes-to-honesdale/',
575 'info_dict': {
576 'id': 'lwYWYxYzE6V5uJMjNGyKtwwiw9ZJD7t2',
577 'ext': 'mp4',
578 'title': 'Steampunk Fest Comes to Honesdale',
579 'duration': 43.276,
580 },
581 'params': {
582 'skip_download': True,
583 }
584 },
585 # embed.ly video
586 {
587 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
588 'info_dict': {
589 'id': '9ODmcdjQcHQ',
590 'ext': 'mp4',
591 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
592 'upload_date': '20140225',
593 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
594 'uploader': 'Tested',
595 'uploader_id': 'testedcom',
596 },
597 # No need to test YoutubeIE here
598 'params': {
599 'skip_download': True,
600 },
601 },
602 # funnyordie embed
603 {
604 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
605 'info_dict': {
606 'id': '18e820ec3f',
607 'ext': 'mp4',
608 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
609 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
610 },
611 # HEAD requests lead to endless 301, while GET is OK
612 'expected_warnings': ['301'],
613 },
614 # RUTV embed
615 {
616 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
617 'info_dict': {
618 'id': '776940',
619 'ext': 'mp4',
620 'title': 'Охотское море стало целиком российским',
621 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
622 },
623 'params': {
624 # m3u8 download
625 'skip_download': True,
626 },
627 },
628 # TVC embed
629 {
630 '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/',
631 'info_dict': {
632 'id': '55304',
633 'ext': 'mp4',
634 'title': 'Дошкольное воспитание',
635 },
636 },
637 # SportBox embed
638 {
639 'url': 'http://www.vestifinance.ru/articles/25753',
640 'info_dict': {
641 'id': '25753',
642 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
643 },
644 'playlist': [{
645 'info_dict': {
646 'id': '370908',
647 'title': 'Госзаказ. День 3',
648 'ext': 'mp4',
649 }
650 }, {
651 'info_dict': {
652 'id': '370905',
653 'title': 'Госзаказ. День 2',
654 'ext': 'mp4',
655 }
656 }, {
657 'info_dict': {
658 'id': '370902',
659 'title': 'Госзаказ. День 1',
660 'ext': 'mp4',
661 }
662 }],
663 'params': {
664 # m3u8 download
665 'skip_download': True,
666 },
667 },
668 # Myvi.ru embed
669 {
670 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
671 'info_dict': {
672 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
673 'ext': 'mp4',
674 'title': 'Ужастики, русский трейлер (2015)',
675 'thumbnail': r're:^https?://.*\.jpg$',
676 'duration': 153,
677 }
678 },
679 # XHamster embed
680 {
681 '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',
682 'info_dict': {
683 'id': 'showthread',
684 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
685 },
686 'playlist_mincount': 7,
687 # This forum does not allow <iframe> syntaxes anymore
688 # Now HTML tags are displayed as-is
689 'skip': 'No videos on this page',
690 },
691 # Embedded TED video
692 {
693 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
694 'md5': '65fdff94098e4a607385a60c5177c638',
695 'info_dict': {
696 'id': '1969',
697 'ext': 'mp4',
698 'title': 'Hidden miracles of the natural world',
699 'uploader': 'Louie Schwartzberg',
700 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
701 }
702 },
703 # nowvideo embed hidden behind percent encoding
704 {
705 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
706 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
707 'info_dict': {
708 'id': '06e53103ca9aa',
709 'ext': 'flv',
710 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
711 'description': 'No description',
712 },
713 },
714 # arte embed
715 {
716 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
717 'md5': '7653032cbb25bf6c80d80f217055fa43',
718 'info_dict': {
719 'id': '048195-004_PLUS7-F',
720 'ext': 'flv',
721 'title': 'X:enius',
722 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
723 'upload_date': '20140320',
724 },
725 'params': {
726 'skip_download': 'Requires rtmpdump'
727 },
728 'skip': 'video gone',
729 },
730 # francetv embed
731 {
732 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
733 'info_dict': {
734 'id': 'EV_30231',
735 'ext': 'mp4',
736 'title': 'Alcaline, le concert avec Calogero',
737 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
738 'upload_date': '20150226',
739 'timestamp': 1424989860,
740 'duration': 5400,
741 },
742 'params': {
743 # m3u8 downloads
744 'skip_download': True,
745 },
746 'expected_warnings': [
747 'Forbidden'
748 ]
749 },
750 # Condé Nast embed
751 {
752 'url': 'http://www.wired.com/2014/04/honda-asimo/',
753 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
754 'info_dict': {
755 'id': '53501be369702d3275860000',
756 'ext': 'mp4',
757 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
758 }
759 },
760 # Dailymotion embed
761 {
762 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
763 'md5': '441aeeb82eb72c422c7f14ec533999cd',
764 'info_dict': {
765 'id': 'k2mm4bCdJ6CQ2i7c8o2',
766 'ext': 'mp4',
767 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
768 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
769 'uploader': 'Spi0n',
770 'uploader_id': 'xgditw',
771 'upload_date': '20140425',
772 'timestamp': 1398441542,
773 },
774 'add_ie': ['Dailymotion'],
775 },
776 # DailyMail embed
777 {
778 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
779 'info_dict': {
780 'id': '1495629',
781 'ext': 'mp4',
782 'title': 'Care worker punches elderly dementia patient in head 11 times',
783 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
784 },
785 'add_ie': ['DailyMail'],
786 'params': {
787 'skip_download': True,
788 },
789 },
790 # YouTube embed
791 {
792 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
793 'info_dict': {
794 'id': 'FXRb4ykk4S0',
795 'ext': 'mp4',
796 'title': 'The NBL Auction 2014',
797 'uploader': 'BADMINTON England',
798 'uploader_id': 'BADMINTONEvents',
799 'upload_date': '20140603',
800 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
801 },
802 'add_ie': ['Youtube'],
803 'params': {
804 'skip_download': True,
805 }
806 },
807 # MTVServices embed
808 {
809 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
810 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
811 'info_dict': {
812 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
813 'ext': 'mp4',
814 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
815 'description': 'Two valets share their love for movie star Liam Neesons.',
816 'timestamp': 1349922600,
817 'upload_date': '20121011',
818 },
819 },
820 # YouTube embed via <data-embed-url="">
821 {
822 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
823 'info_dict': {
824 'id': '4vAffPZIT44',
825 'ext': 'mp4',
826 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
827 'uploader': 'Gameloft',
828 'uploader_id': 'gameloft',
829 'upload_date': '20140828',
830 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
831 },
832 'params': {
833 'skip_download': True,
834 }
835 },
836 # Flowplayer
837 {
838 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
839 'md5': '9d65602bf31c6e20014319c7d07fba27',
840 'info_dict': {
841 'id': '5123ea6d5e5a7',
842 'ext': 'mp4',
843 'age_limit': 18,
844 'uploader': 'www.handjobhub.com',
845 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
846 }
847 },
848 # Multiple brightcove videos
849 # https://github.com/ytdl-org/youtube-dl/issues/2283
850 {
851 'url': 'http://www.newyorker.com/online/blogs/newsdesk/2014/01/always-never-nuclear-command-and-control.html',
852 'info_dict': {
853 'id': 'always-never',
854 'title': 'Always / Never - The New Yorker',
855 },
856 'playlist_count': 3,
857 'params': {
858 'extract_flat': False,
859 'skip_download': True,
860 }
861 },
862 # MLB embed
863 {
864 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
865 'md5': '96f09a37e44da40dd083e12d9a683327',
866 'info_dict': {
867 'id': '33322633',
868 'ext': 'mp4',
869 'title': 'Ump changes call to ball',
870 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
871 'duration': 48,
872 'timestamp': 1401537900,
873 'upload_date': '20140531',
874 'thumbnail': r're:^https?://.*\.jpg$',
875 },
876 },
877 # Wistia standard embed (async)
878 {
879 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
880 'info_dict': {
881 'id': '807fafadvk',
882 'ext': 'mp4',
883 'title': 'Drip Brennan Dunn Workshop',
884 'description': 'a JV Webinars video from getdrip-1',
885 'duration': 4986.95,
886 'timestamp': 1463607249,
887 'upload_date': '20160518',
888 },
889 'params': {
890 'skip_download': True,
891 },
892 'skip': 'webpage 404 not found',
893 },
894 # Soundcloud embed
895 {
896 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
897 'info_dict': {
898 'id': '174391317',
899 'ext': 'mp3',
900 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
901 'uploader': 'Sophos Security',
902 'title': 'Chet Chat 171 - Oct 29, 2014',
903 'upload_date': '20141029',
904 }
905 },
906 # Soundcloud multiple embeds
907 {
908 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
909 'info_dict': {
910 'id': '52809',
911 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
912 },
913 'playlist_mincount': 7,
914 },
915 # TuneIn station embed
916 {
917 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
918 'info_dict': {
919 'id': '204146',
920 'ext': 'mp3',
921 'title': 'CNRV',
922 'location': 'Paris, France',
923 'is_live': True,
924 },
925 'params': {
926 # Live stream
927 'skip_download': True,
928 },
929 },
930 # Livestream embed
931 {
932 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
933 'info_dict': {
934 'id': '67864563',
935 'ext': 'flv',
936 'upload_date': '20141112',
937 'title': 'Rosetta #CometLanding webcast HL 10',
938 }
939 },
940 # Another Livestream embed, without 'new.' in URL
941 {
942 'url': 'https://www.freespeech.org/',
943 'info_dict': {
944 'id': '123537347',
945 'ext': 'mp4',
946 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
947 },
948 'params': {
949 # Live stream
950 'skip_download': True,
951 },
952 },
953 # LazyYT
954 {
955 'url': 'https://skiplagged.com/',
956 'info_dict': {
957 'id': 'skiplagged',
958 'title': 'Skiplagged: The smart way to find cheap flights',
959 },
960 'playlist_mincount': 1,
961 'add_ie': ['Youtube'],
962 },
963 # Cinchcast embed
964 {
965 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
966 'info_dict': {
967 'id': '7141703',
968 'ext': 'mp3',
969 'upload_date': '20141126',
970 'title': 'Jack Tips: 5 Steps to Permanent Gut Healing',
971 }
972 },
973 # Cinerama player
974 {
975 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
976 'info_dict': {
977 'id': '730m_DandD_1901_512k',
978 'ext': 'mp4',
979 'uploader': 'www.abc.net.au',
980 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
981 }
982 },
983 # embedded viddler video
984 {
985 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
986 'info_dict': {
987 'id': '4d03aad9',
988 'ext': 'mp4',
989 'uploader': 'deadspin',
990 'title': 'WALL-TO-GORTAT',
991 'timestamp': 1422285291,
992 'upload_date': '20150126',
993 },
994 'add_ie': ['Viddler'],
995 },
996 # Libsyn embed
997 {
998 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
999 'info_dict': {
1000 'id': '3377616',
1001 'ext': 'mp3',
1002 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
1003 'description': 'md5:601cb790edd05908957dae8aaa866465',
1004 'upload_date': '20150220',
1005 },
1006 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
1007 },
1008 # jwplayer YouTube
1009 {
1010 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
1011 'info_dict': {
1012 'id': 'Mrj4DVp2zeA',
1013 'ext': 'mp4',
1014 'upload_date': '20150212',
1015 'uploader': 'The National Archives UK',
1016 'description': 'md5:8078af856dca76edc42910b61273dbbf',
1017 'uploader_id': 'NationalArchives08',
1018 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
1019 },
1020 },
1021 # jwplayer rtmp
1022 {
1023 'url': 'http://www.suffolk.edu/sjc/live.php',
1024 'info_dict': {
1025 'id': 'live',
1026 'ext': 'flv',
1027 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
1028 'uploader': 'www.suffolk.edu',
1029 },
1030 'params': {
1031 'skip_download': True,
1032 },
1033 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
1034 },
1035 # jwplayer with only the json URL
1036 {
1037 'url': 'https://www.hollywoodreporter.com/news/general-news/dunkirk-team-reveals-what-christopher-nolan-said-oscar-win-meet-your-oscar-winner-1092454',
1038 'info_dict': {
1039 'id': 'TljWkvWH',
1040 'ext': 'mp4',
1041 'upload_date': '20180306',
1042 'title': 'md5:91eb1862f6526415214f62c00b453936',
1043 'description': 'md5:73048ae50ae953da10549d1d2fe9b3aa',
1044 'timestamp': 1520367225,
1045 },
1046 'params': {
1047 'skip_download': True,
1048 },
1049 },
1050 # Complex jwplayer
1051 {
1052 'url': 'http://www.indiedb.com/games/king-machine/videos',
1053 'info_dict': {
1054 'id': 'videos',
1055 'ext': 'mp4',
1056 'title': 'king machine trailer 1',
1057 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
1058 'thumbnail': r're:^https?://.*\.jpg$',
1059 },
1060 },
1061 {
1062 # JWPlayer config passed as variable
1063 'url': 'http://www.txxx.com/videos/3326530/ariele/',
1064 'info_dict': {
1065 'id': '3326530_hq',
1066 'ext': 'mp4',
1067 'title': 'ARIELE | Tube Cup',
1068 'uploader': 'www.txxx.com',
1069 'age_limit': 18,
1070 },
1071 'params': {
1072 'skip_download': True,
1073 }
1074 },
1075 {
1076 # Video.js embed, multiple formats
1077 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
1078 'info_dict': {
1079 'id': 'yygqldloqIk',
1080 'ext': 'mp4',
1081 'title': 'SolidWorks. Урок 6 Настройка чертежа',
1082 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
1083 'upload_date': '20130314',
1084 'uploader': 'PROстое3D',
1085 'uploader_id': 'PROstoe3D',
1086 },
1087 'params': {
1088 'skip_download': True,
1089 },
1090 },
1091 {
1092 # Video.js embed, single format
1093 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
1094 'info_dict': {
1095 'id': 'watch',
1096 'ext': 'mp4',
1097 'title': 'Step 1 - Good Foundation',
1098 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
1099 },
1100 'params': {
1101 'skip_download': True,
1102 },
1103 },
1104 # rtl.nl embed
1105 {
1106 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
1107 'playlist_mincount': 5,
1108 'info_dict': {
1109 'id': 'aanslagen-kopenhagen',
1110 'title': 'Aanslagen Kopenhagen',
1111 }
1112 },
1113 # Zapiks embed
1114 {
1115 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
1116 'info_dict': {
1117 'id': '118046',
1118 'ext': 'mp4',
1119 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
1120 }
1121 },
1122 # Kaltura embed (different embed code)
1123 {
1124 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
1125 'info_dict': {
1126 'id': '1_a52wc67y',
1127 'ext': 'flv',
1128 'upload_date': '20150127',
1129 'uploader_id': 'PremierMedia',
1130 'timestamp': int,
1131 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
1132 },
1133 },
1134 # Kaltura embed with single quotes
1135 {
1136 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
1137 'info_dict': {
1138 'id': '0_izeg5utt',
1139 'ext': 'mp4',
1140 'title': '35871',
1141 'timestamp': 1355743100,
1142 'upload_date': '20121217',
1143 'uploader_id': 'cplapp@learn360.com',
1144 },
1145 'add_ie': ['Kaltura'],
1146 },
1147 {
1148 # Kaltura embedded via quoted entry_id
1149 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
1150 'info_dict': {
1151 'id': '0_utuok90b',
1152 'ext': 'mp4',
1153 'title': '06_matthew_brender_raj_dutt',
1154 'timestamp': 1466638791,
1155 'upload_date': '20160622',
1156 },
1157 'add_ie': ['Kaltura'],
1158 'expected_warnings': [
1159 'Could not send HEAD request'
1160 ],
1161 'params': {
1162 'skip_download': True,
1163 }
1164 },
1165 {
1166 # Kaltura embedded, some fileExt broken (#11480)
1167 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
1168 'info_dict': {
1169 'id': '1_sgtvehim',
1170 'ext': 'mp4',
1171 'title': 'Our "Standard Models" of particle physics and cosmology',
1172 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
1173 'timestamp': 1321158993,
1174 'upload_date': '20111113',
1175 'uploader_id': 'kps1',
1176 },
1177 'add_ie': ['Kaltura'],
1178 },
1179 {
1180 # Kaltura iframe embed
1181 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
1182 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
1183 'info_dict': {
1184 'id': '0_f2cfbpwy',
1185 'ext': 'mp4',
1186 'title': 'I. M. Pei: A Centennial Celebration',
1187 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
1188 'upload_date': '20170403',
1189 'uploader_id': 'batchUser',
1190 'timestamp': 1491232186,
1191 },
1192 'add_ie': ['Kaltura'],
1193 },
1194 {
1195 # Kaltura iframe embed, more sophisticated
1196 'url': 'http://www.cns.nyu.edu/~eero/math-tools/Videos/lecture-05sep2017.html',
1197 'info_dict': {
1198 'id': '1_9gzouybz',
1199 'ext': 'mp4',
1200 'title': 'lecture-05sep2017',
1201 'description': 'md5:40f347d91fd4ba047e511c5321064b49',
1202 'upload_date': '20170913',
1203 'uploader_id': 'eps2',
1204 'timestamp': 1505340777,
1205 },
1206 'params': {
1207 'skip_download': True,
1208 },
1209 'add_ie': ['Kaltura'],
1210 },
1211 {
1212 # meta twitter:player
1213 'url': 'http://thechive.com/2017/12/08/all-i-want-for-christmas-is-more-twerk/',
1214 'info_dict': {
1215 'id': '0_01b42zps',
1216 'ext': 'mp4',
1217 'title': 'Main Twerk (Video)',
1218 'upload_date': '20171208',
1219 'uploader_id': 'sebastian.salinas@thechive.com',
1220 'timestamp': 1512713057,
1221 },
1222 'params': {
1223 'skip_download': True,
1224 },
1225 'add_ie': ['Kaltura'],
1226 },
1227 # referrer protected EaglePlatform embed
1228 {
1229 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
1230 'info_dict': {
1231 'id': '582306',
1232 'ext': 'mp4',
1233 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
1234 'thumbnail': r're:^https?://.*\.jpg$',
1235 'duration': 3382,
1236 'view_count': int,
1237 },
1238 'params': {
1239 'skip_download': True,
1240 },
1241 },
1242 # ClipYou (EaglePlatform) embed (custom URL)
1243 {
1244 'url': 'http://muz-tv.ru/play/7129/',
1245 # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
1246 'info_dict': {
1247 'id': '12820',
1248 'ext': 'mp4',
1249 'title': "'O Sole Mio",
1250 'thumbnail': r're:^https?://.*\.jpg$',
1251 'duration': 216,
1252 'view_count': int,
1253 },
1254 'params': {
1255 'skip_download': True,
1256 },
1257 'skip': 'This video is unavailable.',
1258 },
1259 # Pladform embed
1260 {
1261 'url': 'http://muz-tv.ru/kinozal/view/7400/',
1262 'info_dict': {
1263 'id': '100183293',
1264 'ext': 'mp4',
1265 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
1266 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
1267 'thumbnail': r're:^https?://.*\.jpg$',
1268 'duration': 694,
1269 'age_limit': 0,
1270 },
1271 'skip': 'HTTP Error 404: Not Found',
1272 },
1273 # Playwire embed
1274 {
1275 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
1276 'info_dict': {
1277 'id': '3519514',
1278 'ext': 'mp4',
1279 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
1280 'thumbnail': r're:^https?://.*\.png$',
1281 'duration': 45.115,
1282 },
1283 },
1284 # Crooks and Liars embed
1285 {
1286 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
1287 'info_dict': {
1288 'id': '8RUoRhRi',
1289 'ext': 'mp4',
1290 'title': "Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!",
1291 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
1292 'timestamp': 1428207000,
1293 'upload_date': '20150405',
1294 'uploader': 'Heather',
1295 },
1296 },
1297 # Crooks and Liars external embed
1298 {
1299 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
1300 'info_dict': {
1301 'id': 'MTE3MjUtMzQ2MzA',
1302 'ext': 'mp4',
1303 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
1304 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
1305 'timestamp': 1265032391,
1306 'upload_date': '20100201',
1307 'uploader': 'Heather',
1308 },
1309 },
1310 # NBC Sports vplayer embed
1311 {
1312 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
1313 'info_dict': {
1314 'id': 'ln7x1qSThw4k',
1315 'ext': 'flv',
1316 'title': "PFT Live: New leader in the 'new-look' defense",
1317 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
1318 'uploader': 'NBCU-SPORTS',
1319 'upload_date': '20140107',
1320 'timestamp': 1389118457,
1321 },
1322 'skip': 'Invalid Page URL',
1323 },
1324 # NBC News embed
1325 {
1326 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
1327 'md5': '1aa589c675898ae6d37a17913cf68d66',
1328 'info_dict': {
1329 'id': 'x_dtl_oa_LettermanliftPR_160608',
1330 'ext': 'mp4',
1331 'title': 'David Letterman: A Preview',
1332 '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.',
1333 'upload_date': '20160609',
1334 'timestamp': 1465431544,
1335 'uploader': 'NBCU-NEWS',
1336 },
1337 },
1338 # UDN embed
1339 {
1340 'url': 'https://video.udn.com/news/300346',
1341 'md5': 'fd2060e988c326991037b9aff9df21a6',
1342 'info_dict': {
1343 'id': '300346',
1344 'ext': 'mp4',
1345 'title': '中一中男師變性 全校師生力挺',
1346 'thumbnail': r're:^https?://.*\.jpg$',
1347 },
1348 'params': {
1349 # m3u8 download
1350 'skip_download': True,
1351 },
1352 'expected_warnings': ['Failed to parse JSON Expecting value'],
1353 },
1354 # Brightcove URL in single quotes
1355 {
1356 'url': 'http://www.sportsnet.ca/baseball/mlb/sn-presents-russell-martin-world-citizen/',
1357 'md5': '4ae374f1f8b91c889c4b9203c8c752af',
1358 'info_dict': {
1359 'id': '4255764656001',
1360 'ext': 'mp4',
1361 'title': 'SN Presents: Russell Martin, World Citizen',
1362 'description': 'To understand why he was the Toronto Blue Jays’ top off-season priority is to appreciate his background and upbringing in Montreal, where he first developed his baseball skills. Written and narrated by Stephen Brunt.',
1363 'uploader': 'Rogers Sportsnet',
1364 'uploader_id': '1704050871',
1365 'upload_date': '20150525',
1366 'timestamp': 1432570283,
1367 },
1368 },
1369 # Kinja embed
1370 {
1371 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
1372 'info_dict': {
1373 'id': '106351',
1374 'ext': 'mp4',
1375 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
1376 'description': 'Migrated from OnionStudios',
1377 'thumbnail': r're:^https?://.*\.jpe?g$',
1378 'uploader': 'clickhole',
1379 'upload_date': '20150527',
1380 'timestamp': 1432744860,
1381 }
1382 },
1383 # SnagFilms embed
1384 {
1385 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
1386 'info_dict': {
1387 'id': '74849a00-85a9-11e1-9660-123139220831',
1388 'ext': 'mp4',
1389 'title': '#whilewewatch',
1390 }
1391 },
1392 # AdobeTVVideo embed
1393 {
1394 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
1395 'md5': '43662b577c018ad707a63766462b1e87',
1396 'info_dict': {
1397 'id': '2456',
1398 'ext': 'mp4',
1399 'title': 'New experience with Acrobat DC',
1400 'description': 'New experience with Acrobat DC',
1401 'duration': 248.667,
1402 },
1403 },
1404 # BrightcoveInPageEmbed embed
1405 {
1406 'url': 'http://www.geekandsundry.com/tabletop-bonus-wils-final-thoughts-on-dread/',
1407 'info_dict': {
1408 'id': '4238694884001',
1409 'ext': 'flv',
1410 'title': 'Tabletop: Dread, Last Thoughts',
1411 'description': 'Tabletop: Dread, Last Thoughts',
1412 'duration': 51690,
1413 },
1414 },
1415 # Brightcove embed, with no valid 'renditions' but valid 'IOSRenditions'
1416 # This video can't be played in browsers if Flash disabled and UA set to iPhone, which is actually a false alarm
1417 {
1418 'url': 'https://dl.dropboxusercontent.com/u/29092637/interview.html',
1419 'info_dict': {
1420 'id': '4785848093001',
1421 'ext': 'mp4',
1422 'title': 'The Cardinal Pell Interview',
1423 'description': 'Sky News Contributor Andrew Bolt interviews George Pell in Rome, following the Cardinal\'s evidence before the Royal Commission into Child Abuse. ',
1424 'uploader': 'GlobeCast Australia - GlobeStream',
1425 'uploader_id': '2733773828001',
1426 'upload_date': '20160304',
1427 'timestamp': 1457083087,
1428 },
1429 'params': {
1430 # m3u8 downloads
1431 'skip_download': True,
1432 },
1433 },
1434 {
1435 # Brightcove embed with whitespace around attribute names
1436 'url': 'http://www.stack.com/video/3167554373001/learn-to-hit-open-three-pointers-with-damian-lillard-s-baseline-drift-drill',
1437 'info_dict': {
1438 'id': '3167554373001',
1439 'ext': 'mp4',
1440 'title': "Learn to Hit Open Three-Pointers With Damian Lillard's Baseline Drift Drill",
1441 'description': 'md5:57bacb0e0f29349de4972bfda3191713',
1442 'uploader_id': '1079349493',
1443 'upload_date': '20140207',
1444 'timestamp': 1391810548,
1445 },
1446 'params': {
1447 'skip_download': True,
1448 },
1449 },
1450 # Another form of arte.tv embed
1451 {
1452 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
1453 'md5': '850bfe45417ddf221288c88a0cffe2e2',
1454 'info_dict': {
1455 'id': '030273-562_PLUS7-F',
1456 'ext': 'mp4',
1457 'title': 'ARTE Reportage - Nulle part, en France',
1458 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
1459 'upload_date': '20160409',
1460 },
1461 },
1462 # Duplicated embedded video URLs
1463 {
1464 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
1465 'info_dict': {
1466 'id': '149298443_480_16c25b74_2',
1467 'ext': 'mp4',
1468 'title': 'vs. Blue Orange Spring Game',
1469 'uploader': 'www.hudl.com',
1470 },
1471 },
1472 # twitter:player:stream embed
1473 {
1474 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
1475 'info_dict': {
1476 'id': 'master',
1477 'ext': 'mp4',
1478 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
1479 'uploader': 'www.rtl.be',
1480 },
1481 'params': {
1482 # m3u8 downloads
1483 'skip_download': True,
1484 },
1485 },
1486 # twitter:player embed
1487 {
1488 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
1489 'md5': 'a3e0df96369831de324f0778e126653c',
1490 'info_dict': {
1491 'id': '4909620399001',
1492 'ext': 'mp4',
1493 'title': 'What Do Black Holes Sound Like?',
1494 'description': 'what do black holes sound like',
1495 'upload_date': '20160524',
1496 'uploader_id': '29913724001',
1497 'timestamp': 1464107587,
1498 'uploader': 'TheAtlantic',
1499 },
1500 'add_ie': ['BrightcoveLegacy'],
1501 },
1502 # Facebook <iframe> embed
1503 {
1504 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
1505 'md5': 'fbcde74f534176ecb015849146dd3aee',
1506 'info_dict': {
1507 'id': '599637780109885',
1508 'ext': 'mp4',
1509 'title': 'Facebook video #599637780109885',
1510 },
1511 },
1512 # Facebook <iframe> embed, plugin video
1513 {
1514 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
1515 'info_dict': {
1516 'id': '1754168231264132',
1517 'ext': 'mp4',
1518 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
1519 'uploader': 'Tariq Ramadan (official)',
1520 'timestamp': 1496758379,
1521 'upload_date': '20170606',
1522 },
1523 'params': {
1524 'skip_download': True,
1525 },
1526 },
1527 # Facebook API embed
1528 {
1529 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
1530 'md5': 'a47372ee61b39a7b90287094d447d94e',
1531 'info_dict': {
1532 'id': '10153467542406923',
1533 'ext': 'mp4',
1534 'title': 'Facebook video #10153467542406923',
1535 },
1536 },
1537 # Wordpress "YouTube Video Importer" plugin
1538 {
1539 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
1540 'md5': 'd16797741b560b485194eddda8121b48',
1541 'info_dict': {
1542 'id': 'HNTXWDXV9Is',
1543 'ext': 'mp4',
1544 'title': 'Blue Devils Drumline Stanford lot 2016',
1545 'upload_date': '20160627',
1546 'uploader_id': 'GENOCIDE8GENERAL10',
1547 'uploader': 'cylus cyrus',
1548 },
1549 },
1550 {
1551 # video stored on custom kaltura server
1552 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
1553 'md5': '537617d06e64dfed891fa1593c4b30cc',
1554 'info_dict': {
1555 'id': '0_1iotm5bh',
1556 'ext': 'mp4',
1557 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
1558 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
1559 'uploader_id': 'videos.expansion@el-mundo.net',
1560 'upload_date': '20150429',
1561 'timestamp': 1430303472,
1562 },
1563 'add_ie': ['Kaltura'],
1564 },
1565 {
1566 # multiple kaltura embeds, nsfw
1567 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html',
1568 'info_dict': {
1569 'id': 'kamila-avec-video-jaime-sadomie',
1570 'title': "Kamila avec vídeo “J'aime sadomie”",
1571 },
1572 'playlist_count': 8,
1573 },
1574 {
1575 # Non-standard Vimeo embed
1576 'url': 'https://openclassrooms.com/courses/understanding-the-web',
1577 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
1578 'info_dict': {
1579 'id': '148867247',
1580 'ext': 'mp4',
1581 'title': 'Understanding the web - Teaser',
1582 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
1583 'upload_date': '20151214',
1584 'uploader': 'OpenClassrooms',
1585 'uploader_id': 'openclassrooms',
1586 },
1587 'add_ie': ['Vimeo'],
1588 },
1589 {
1590 # generic vimeo embed that requires original URL passed as Referer
1591 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
1592 'only_matching': True,
1593 },
1594 {
1595 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
1596 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
1597 'info_dict': {
1598 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
1599 'ext': 'mp4',
1600 'title': 'Big Buck Bunny',
1601 'description': 'Royalty free test video',
1602 'timestamp': 1432816365,
1603 'upload_date': '20150528',
1604 'is_live': False,
1605 },
1606 'params': {
1607 'skip_download': True,
1608 },
1609 'add_ie': ['Arkena'],
1610 },
1611 {
1612 '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/',
1613 'info_dict': {
1614 'id': '1c7141f46c',
1615 'ext': 'mp4',
1616 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
1617 },
1618 'params': {
1619 'skip_download': True,
1620 },
1621 'add_ie': ['Vbox7'],
1622 },
1623 {
1624 # DBTV embeds
1625 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
1626 'info_dict': {
1627 'id': '43254897',
1628 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
1629 },
1630 'playlist_mincount': 3,
1631 },
1632 {
1633 # Videa embeds
1634 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
1635 'info_dict': {
1636 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
1637 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
1638 },
1639 'playlist_mincount': 2,
1640 },
1641 {
1642 # 20 minuten embed
1643 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
1644 'info_dict': {
1645 'id': '523629',
1646 'ext': 'mp4',
1647 'title': 'So kommen Sie bei Eis und Schnee sicher an',
1648 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
1649 },
1650 'params': {
1651 'skip_download': True,
1652 },
1653 'add_ie': ['TwentyMinuten'],
1654 },
1655 {
1656 # VideoPress embed
1657 'url': 'https://en.support.wordpress.com/videopress/',
1658 'info_dict': {
1659 'id': 'OcobLTqC',
1660 'ext': 'm4v',
1661 'title': 'IMG_5786',
1662 'timestamp': 1435711927,
1663 'upload_date': '20150701',
1664 },
1665 'params': {
1666 'skip_download': True,
1667 },
1668 'add_ie': ['VideoPress'],
1669 },
1670 {
1671 # Rutube embed
1672 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
1673 'info_dict': {
1674 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
1675 'ext': 'flv',
1676 'title': 'Магаззино: Казань 2',
1677 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
1678 'uploader': 'Магаззино',
1679 'upload_date': '20170228',
1680 'uploader_id': '996642',
1681 },
1682 'params': {
1683 'skip_download': True,
1684 },
1685 'add_ie': ['Rutube'],
1686 },
1687 {
1688 # glomex:embed
1689 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes',
1690 'info_dict': {
1691 'id': 'v-ch2nkhcirwc9-sf',
1692 'ext': 'mp4',
1693 'title': 'md5:786e1e24e06c55993cee965ef853a0c1',
1694 'description': 'md5:8b517a61d577efe7e36fde72fd535995',
1695 'timestamp': 1641885019,
1696 'upload_date': '20220111',
1697 'duration': 460000,
1698 'thumbnail': 'https://i3thumbs.glomex.com/dC1idjJwdndiMjRzeGwvMjAyMi8wMS8xMS8wNy8xMF8zNV82MWRkMmQ2YmU5ZTgyLmpwZw==/profile:player-960x540',
1699 },
1700 },
1701 {
1702 # megatvcom:embed
1703 'url': 'https://www.in.gr/2021/12/18/greece/apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize/',
1704 'info_dict': {
1705 'id': 'apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize',
1706 'title': 'md5:5e569cf996ec111057c2764ec272848f',
1707 },
1708 'playlist': [{
1709 'md5': '1afa26064ff00ccb91617957dbc73dc1',
1710 'info_dict': {
1711 'ext': 'mp4',
1712 'id': '564916',
1713 'display_id': 'md5:6cdf22d3a2e7bacb274b7295089a1770',
1714 'title': 'md5:33b9dd39584685b62873043670eb52a6',
1715 'description': 'md5:c1db7310f390518ac36dd69d947ef1a1',
1716 'timestamp': 1639753145,
1717 'upload_date': '20211217',
1718 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/prezerakos-1024x597.jpg',
1719 },
1720 }, {
1721 'md5': '4a1c220695f1ef865a8b7966a53e2474',
1722 'info_dict': {
1723 'ext': 'mp4',
1724 'id': '564905',
1725 'display_id': 'md5:ead15695e485e649aed2b81ebd699b88',
1726 'title': 'md5:2b71fd54249a3ca34609fe39ae31c47b',
1727 'description': 'md5:c42e12f638d0a97d6de4508e2c4df982',
1728 'timestamp': 1639753047,
1729 'upload_date': '20211217',
1730 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/tsiodras-mitsotakis-1024x545.jpg',
1731 },
1732 }]
1733 },
1734 {
1735 'url': 'https://www.ertnews.gr/video/manolis-goyalles-o-anthropos-piso-apo-ti-diadiktyaki-vasilopita/',
1736 'info_dict': {
1737 'id': '2022/tv/news-themata-ianouarios/20220114-apotis6-gouales-pita.mp4',
1738 'ext': 'mp4',
1739 'title': 'md5:df64f5b61c06d0e9556c0cdd5cf14464',
1740 'thumbnail': 'https://www.ert.gr/themata/photos/2021/20220114-apotis6-gouales-pita.jpg',
1741 },
1742 },
1743 {
1744 # ThePlatform embedded with whitespaces in URLs
1745 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
1746 'only_matching': True,
1747 },
1748 {
1749 # Senate ISVP iframe https
1750 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
1751 'md5': 'fb8c70b0b515e5037981a2492099aab8',
1752 'info_dict': {
1753 'id': 'govtaff020316',
1754 'ext': 'mp4',
1755 'title': 'Integrated Senate Video Player',
1756 },
1757 'add_ie': ['SenateISVP'],
1758 },
1759 {
1760 # Limelight embeds (1 channel embed + 4 media embeds)
1761 'url': 'http://www.sedona.com/FacilitatorTraining2017',
1762 'info_dict': {
1763 'id': 'FacilitatorTraining2017',
1764 'title': 'Facilitator Training 2017',
1765 },
1766 'playlist_mincount': 5,
1767 },
1768 {
1769 # Limelight embed (LimelightPlayerUtil.embed)
1770 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
1771 'info_dict': {
1772 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
1773 'ext': 'mp4',
1774 'title': '07448641',
1775 'timestamp': 1499890639,
1776 'upload_date': '20170712',
1777 },
1778 'params': {
1779 'skip_download': True,
1780 },
1781 'add_ie': ['LimelightMedia'],
1782 },
1783 {
1784 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
1785 'info_dict': {
1786 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
1787 'title': 'Standoff with Walnut Creek murder suspect ends',
1788 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
1789 },
1790 'playlist_mincount': 4,
1791 },
1792 {
1793 # WashingtonPost embed
1794 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
1795 'info_dict': {
1796 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
1797 'ext': 'mp4',
1798 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
1799 '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.',
1800 'timestamp': 1455216756,
1801 'uploader': 'The Washington Post',
1802 'upload_date': '20160211',
1803 },
1804 'add_ie': ['WashingtonPost'],
1805 },
1806 {
1807 # Mediaset embed
1808 'url': 'http://www.tgcom24.mediaset.it/politica/serracchiani-voglio-vivere-in-una-societa-aperta-reazioni-sproporzionate-_3071354-201702a.shtml',
1809 'info_dict': {
1810 'id': '720642',
1811 'ext': 'mp4',
1812 'title': 'Serracchiani: "Voglio vivere in una società aperta, con tutela del patto di fiducia"',
1813 },
1814 'params': {
1815 'skip_download': True,
1816 },
1817 'add_ie': ['Mediaset'],
1818 },
1819 {
1820 # JOJ.sk embeds
1821 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
1822 'info_dict': {
1823 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
1824 'title': 'Slovenskom sa prehnala vlna silných búrok',
1825 },
1826 'playlist_mincount': 5,
1827 'add_ie': ['Joj'],
1828 },
1829 {
1830 # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
1831 'url': 'https://tvrain.ru/amp/418921/',
1832 'md5': 'cc00413936695987e8de148b67d14f1d',
1833 'info_dict': {
1834 'id': '418921',
1835 'ext': 'mp4',
1836 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
1837 },
1838 },
1839 {
1840 # vzaar embed
1841 'url': 'http://help.vzaar.com/article/165-embedding-video',
1842 'md5': '7e3919d9d2620b89e3e00bec7fe8c9d4',
1843 'info_dict': {
1844 'id': '8707641',
1845 'ext': 'mp4',
1846 'title': 'Building A Business Online: Principal Chairs Q & A',
1847 },
1848 },
1849 {
1850 # multiple HTML5 videos on one page
1851 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
1852 'info_dict': {
1853 'id': 'keyscenarios',
1854 'title': 'Rescue Kit 14 Free Edition - Getting started',
1855 },
1856 'playlist_count': 4,
1857 },
1858 {
1859 # vshare embed
1860 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
1861 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
1862 'info_dict': {
1863 'id': '0f64ce6',
1864 'title': 'vl14062007715967',
1865 'ext': 'mp4',
1866 }
1867 },
1868 {
1869 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
1870 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
1871 'info_dict': {
1872 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
1873 'ext': 'mp4',
1874 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
1875 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
1876 'timestamp': 1474354800,
1877 'upload_date': '20160920',
1878 }
1879 },
1880 {
1881 'url': 'http://www.kidzworld.com/article/30935-trolls-the-beat-goes-on-interview-skylar-astin-and-amanda-leighton',
1882 'info_dict': {
1883 'id': '1731611',
1884 'ext': 'mp4',
1885 'title': 'Official Trailer | TROLLS: THE BEAT GOES ON!',
1886 'description': 'md5:eb5f23826a027ba95277d105f248b825',
1887 'timestamp': 1516100691,
1888 'upload_date': '20180116',
1889 },
1890 'params': {
1891 'skip_download': True,
1892 },
1893 'add_ie': ['SpringboardPlatform'],
1894 },
1895 {
1896 'url': 'https://www.yapfiles.ru/show/1872528/690b05d3054d2dbe1e69523aa21bb3b1.mp4.html',
1897 'info_dict': {
1898 'id': 'vMDE4NzI1Mjgt690b',
1899 'ext': 'mp4',
1900 'title': 'Котята',
1901 },
1902 'add_ie': ['YapFiles'],
1903 'params': {
1904 'skip_download': True,
1905 },
1906 },
1907 {
1908 # CloudflareStream embed
1909 'url': 'https://www.cloudflare.com/products/cloudflare-stream/',
1910 'info_dict': {
1911 'id': '31c9291ab41fac05471db4e73aa11717',
1912 'ext': 'mp4',
1913 'title': '31c9291ab41fac05471db4e73aa11717',
1914 },
1915 'add_ie': ['CloudflareStream'],
1916 'params': {
1917 'skip_download': True,
1918 },
1919 },
1920 {
1921 # PeerTube embed
1922 'url': 'https://joinpeertube.org/fr/home/',
1923 'info_dict': {
1924 'id': 'home',
1925 'title': 'Reprenez le contrôle de vos vidéos ! #JoinPeertube',
1926 },
1927 'playlist_count': 2,
1928 },
1929 {
1930 # Indavideo embed
1931 'url': 'https://streetkitchen.hu/receptek/igy_kell_otthon_hamburgert_sutni/',
1932 'info_dict': {
1933 'id': '1693903',
1934 'ext': 'mp4',
1935 'title': 'Így kell otthon hamburgert sütni',
1936 'description': 'md5:f5a730ecf900a5c852e1e00540bbb0f7',
1937 'timestamp': 1426330212,
1938 'upload_date': '20150314',
1939 'uploader': 'StreetKitchen',
1940 'uploader_id': '546363',
1941 },
1942 'add_ie': ['IndavideoEmbed'],
1943 'params': {
1944 'skip_download': True,
1945 },
1946 },
1947 {
1948 # APA embed via JWPlatform embed
1949 'url': 'http://www.vol.at/blue-man-group/5593454',
1950 'info_dict': {
1951 'id': 'jjv85FdZ',
1952 'ext': 'mp4',
1953 'title': '"Blau ist mysteriös": Die Blue Man Group im Interview',
1954 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
1955 'thumbnail': r're:^https?://.*\.jpg$',
1956 'duration': 254,
1957 'timestamp': 1519211149,
1958 'upload_date': '20180221',
1959 },
1960 'params': {
1961 'skip_download': True,
1962 },
1963 },
1964 {
1965 'url': 'http://share-videos.se/auto/video/83645793?uid=13',
1966 'md5': 'b68d276de422ab07ee1d49388103f457',
1967 'info_dict': {
1968 'id': '83645793',
1969 'title': 'Lock up and get excited',
1970 'ext': 'mp4'
1971 },
1972 'skip': 'TODO: fix nested playlists processing in tests',
1973 },
1974 {
1975 # Viqeo embeds
1976 'url': 'https://viqeo.tv/',
1977 'info_dict': {
1978 'id': 'viqeo',
1979 'title': 'All-new video platform',
1980 },
1981 'playlist_count': 6,
1982 },
1983 {
1984 # Squarespace video embed, 2019-08-28
1985 'url': 'http://ootboxford.com',
1986 'info_dict': {
1987 'id': 'Tc7b_JGdZfw',
1988 'title': 'Out of the Blue, at Childish Things 10',
1989 'ext': 'mp4',
1990 'description': 'md5:a83d0026666cf5ee970f8bd1cfd69c7f',
1991 'uploader_id': 'helendouglashouse',
1992 'uploader': 'Helen & Douglas House',
1993 'upload_date': '20140328',
1994 },
1995 'params': {
1996 'skip_download': True,
1997 },
1998 },
1999 # {
2000 # # Zype embed
2001 # 'url': 'https://www.cookscountry.com/episode/554-smoky-barbecue-favorites',
2002 # 'info_dict': {
2003 # 'id': '5b400b834b32992a310622b9',
2004 # 'ext': 'mp4',
2005 # 'title': 'Smoky Barbecue Favorites',
2006 # 'thumbnail': r're:^https?://.*\.jpe?g',
2007 # 'description': 'md5:5ff01e76316bd8d46508af26dc86023b',
2008 # 'upload_date': '20170909',
2009 # 'timestamp': 1504915200,
2010 # },
2011 # 'add_ie': [ZypeIE.ie_key()],
2012 # 'params': {
2013 # 'skip_download': True,
2014 # },
2015 # },
2016 {
2017 # videojs embed
2018 'url': 'https://video.sibnet.ru/shell.php?videoid=3422904',
2019 'info_dict': {
2020 'id': 'shell',
2021 'ext': 'mp4',
2022 'title': 'Доставщик пиццы спросил разрешения сыграть на фортепиано',
2023 'description': 'md5:89209cdc587dab1e4a090453dbaa2cb1',
2024 'thumbnail': r're:^https?://.*\.jpg$',
2025 },
2026 'params': {
2027 'skip_download': True,
2028 },
2029 'expected_warnings': ['Failed to download MPD manifest'],
2030 },
2031 {
2032 # DailyMotion embed with DM.player
2033 'url': 'https://www.beinsports.com/us/copa-del-rey/video/the-locker-room-valencia-beat-barca-in-copa/1203804',
2034 'info_dict': {
2035 'id': 'k6aKkGHd9FJs4mtJN39',
2036 'ext': 'mp4',
2037 'title': 'The Locker Room: Valencia Beat Barca In Copa del Rey Final',
2038 'description': 'This video is private.',
2039 'uploader_id': 'x1jf30l',
2040 'uploader': 'beIN SPORTS USA',
2041 'upload_date': '20190528',
2042 'timestamp': 1559062971,
2043 },
2044 'params': {
2045 'skip_download': True,
2046 },
2047 },
2048 {
2049 # tvopengr:embed
2050 'url': 'https://www.ethnos.gr/World/article/190604/hparosiaxekinoynoisynomiliessthgeneyhmethskiatoypolemoypanoapothnoykrania',
2051 'md5': 'eb0c3995d0a6f18f6538c8e057865d7d',
2052 'info_dict': {
2053 'id': '101119',
2054 'ext': 'mp4',
2055 'display_id': 'oikarpoitondiapragmateyseonhparosias',
2056 'title': 'md5:b979f4d640c568617d6547035528a149',
2057 'description': 'md5:e54fc1977c7159b01cc11cd7d9d85550',
2058 'timestamp': 1641772800,
2059 'upload_date': '20220110',
2060 'thumbnail': 'https://opentv-static.siliconweb.com/imgHandler/1920/70bc39fa-895b-4918-a364-c39d2135fc6d.jpg',
2061
2062 }
2063 },
2064 {
2065 # blogger embed
2066 'url': 'https://blog.tomeuvizoso.net/2019/01/a-panfrost-milestone.html',
2067 'md5': 'f1bc19b6ea1b0fd1d81e84ca9ec467ac',
2068 'info_dict': {
2069 'id': 'BLOGGER-video-3c740e3a49197e16-796',
2070 'ext': 'mp4',
2071 'title': 'Blogger',
2072 'thumbnail': r're:^https?://.*',
2073 },
2074 },
2075 # {
2076 # # TODO: find another test
2077 # # http://schema.org/VideoObject
2078 # 'url': 'https://flipagram.com/f/nyvTSJMKId',
2079 # 'md5': '888dcf08b7ea671381f00fab74692755',
2080 # 'info_dict': {
2081 # 'id': 'nyvTSJMKId',
2082 # 'ext': 'mp4',
2083 # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
2084 # 'description': '#love for cats.',
2085 # 'timestamp': 1461244995,
2086 # 'upload_date': '20160421',
2087 # },
2088 # 'params': {
2089 # 'force_generic_extractor': True,
2090 # },
2091 # },
2092 {
2093 # VHX Embed
2094 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
2095 'info_dict': {
2096 'id': '858208',
2097 'ext': 'mp4',
2098 'title': 'Untitled',
2099 'uploader_id': 'user80538407',
2100 'uploader': 'OTT Videos',
2101 },
2102 },
2103 {
2104 # ArcPublishing PoWa video player
2105 'url': 'https://www.adn.com/politics/2020/11/02/video-senate-candidates-campaign-in-anchorage-on-eve-of-election-day/',
2106 'md5': 'b03b2fac8680e1e5a7cc81a5c27e71b3',
2107 'info_dict': {
2108 'id': '8c99cb6e-b29c-4bc9-9173-7bf9979225ab',
2109 'ext': 'mp4',
2110 'title': 'Senate candidates wave to voters on Anchorage streets',
2111 'description': 'md5:91f51a6511f090617353dc720318b20e',
2112 'timestamp': 1604378735,
2113 'upload_date': '20201103',
2114 'duration': 1581,
2115 },
2116 },
2117 {
2118 # MyChannels SDK embed
2119 # https://www.24kitchen.nl/populair/deskundige-dit-waarom-sommigen-gevoelig-zijn-voor-voedselallergieen
2120 'url': 'https://www.demorgen.be/nieuws/burgemeester-rotterdam-richt-zich-in-videoboodschap-tot-relschoppers-voelt-het-goed~b0bcfd741/',
2121 'md5': '90c0699c37006ef18e198c032d81739c',
2122 'info_dict': {
2123 'id': '194165',
2124 'ext': 'mp4',
2125 'title': 'Burgemeester Aboutaleb spreekt relschoppers toe',
2126 'timestamp': 1611740340,
2127 'upload_date': '20210127',
2128 'duration': 159,
2129 },
2130 },
2131 {
2132 # Simplecast player embed
2133 'url': 'https://www.bio.org/podcast',
2134 'info_dict': {
2135 'id': 'podcast',
2136 'title': 'I AM BIO Podcast | BIO',
2137 },
2138 'playlist_mincount': 52,
2139 },
2140 {
2141 # Sibnet embed (https://help.sibnet.ru/?sibnet_video_embed)
2142 'url': 'https://phpbb3.x-tk.ru/bbcode-video-sibnet-t24.html',
2143 'only_matching': True,
2144 }, {
2145 # WimTv embed player
2146 'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
2147 'info_dict': {
2148 'id': 'wearefmi-pt-2-2021',
2149 'title': '#WEAREFMI – PT.2 – 2021 – MsMotorTV',
2150 },
2151 'playlist_count': 1,
2152 }, {
2153 # KVS Player
2154 'url': 'https://www.kvs-demo.com/videos/105/kelis-4th-of-july/',
2155 'info_dict': {
2156 'id': '105',
2157 'display_id': 'kelis-4th-of-july',
2158 'ext': 'mp4',
2159 'title': 'Kelis - 4th Of July',
2160 'thumbnail': 'https://kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
2161 },
2162 'params': {
2163 'skip_download': True,
2164 },
2165 }, {
2166 # KVS Player
2167 'url': 'https://www.kvs-demo.com/embed/105/',
2168 'info_dict': {
2169 'id': '105',
2170 'display_id': 'kelis-4th-of-july',
2171 'ext': 'mp4',
2172 'title': 'Kelis - 4th Of July / Embed Player',
2173 'thumbnail': 'https://kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
2174 },
2175 'params': {
2176 'skip_download': True,
2177 },
2178 }, {
2179 # KVS Player
2180 'url': 'https://thisvid.com/videos/french-boy-pantsed/',
2181 'md5': '3397979512c682f6b85b3b04989df224',
2182 'info_dict': {
2183 'id': '2400174',
2184 'display_id': 'french-boy-pantsed',
2185 'ext': 'mp4',
2186 'title': 'French Boy Pantsed - ThisVid.com',
2187 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2400000/2400174/preview.mp4.jpg',
2188 }
2189 }, {
2190 # KVS Player
2191 'url': 'https://thisvid.com/embed/2400174/',
2192 'md5': '3397979512c682f6b85b3b04989df224',
2193 'info_dict': {
2194 'id': '2400174',
2195 'display_id': 'french-boy-pantsed',
2196 'ext': 'mp4',
2197 'title': 'French Boy Pantsed - ThisVid.com',
2198 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2400000/2400174/preview.mp4.jpg',
2199 }
2200 }, {
2201 # KVS Player
2202 'url': 'https://youix.com/video/leningrad-zoj/',
2203 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
2204 'info_dict': {
2205 'id': '18485',
2206 'display_id': 'leningrad-zoj',
2207 'ext': 'mp4',
2208 'title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',
2209 'thumbnail': 'https://youix.com/contents/videos_screenshots/18000/18485/preview_480x320_youix_com.mp4.jpg',
2210 }
2211 }, {
2212 # KVS Player
2213 'url': 'https://youix.com/embed/18485',
2214 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
2215 'info_dict': {
2216 'id': '18485',
2217 'display_id': 'leningrad-zoj',
2218 'ext': 'mp4',
2219 'title': 'Ленинград - ЗОЖ',
2220 'thumbnail': 'https://youix.com/contents/videos_screenshots/18000/18485/preview_480x320_youix_com.mp4.jpg',
2221 }
2222 }, {
2223 # KVS Player
2224 'url': 'https://bogmedia.org/videos/21217/40-nochey-40-nights-2016/',
2225 'md5': '94166bdb26b4cb1fb9214319a629fc51',
2226 'info_dict': {
2227 'id': '21217',
2228 'display_id': '40-nochey-40-nights-2016',
2229 'ext': 'mp4',
2230 'title': '40 ночей (2016) - BogMedia.org',
2231 'thumbnail': 'https://bogmedia.org/contents/videos_screenshots/21000/21217/preview_480p.mp4.jpg',
2232 }
2233 },
2234 {
2235 # KVS Player (for sites that serve kt_player.js via non-https urls)
2236 'url': 'http://www.camhub.world/embed/389508',
2237 'md5': 'fbe89af4cfb59c8fd9f34a202bb03e32',
2238 'info_dict': {
2239 'id': '389508',
2240 'display_id': 'syren-de-mer-onlyfans-05-07-2020have-a-happy-safe-holiday5f014e68a220979bdb8cd-source',
2241 'ext': 'mp4',
2242 'title': 'Syren De Mer onlyfans_05-07-2020Have_a_happy_safe_holiday5f014e68a220979bdb8cd_source / Embed плеер',
2243 'thumbnail': 'http://www.camhub.world/contents/videos_screenshots/389000/389508/preview.mp4.jpg',
2244 }
2245 },
2246 {
2247 # Reddit-hosted video that will redirect and be processed by RedditIE
2248 # Redirects to https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
2249 'url': 'https://v.redd.it/zv89llsvexdz',
2250 'md5': '87f5f02f6c1582654146f830f21f8662',
2251 'info_dict': {
2252 'id': 'zv89llsvexdz',
2253 'ext': 'mp4',
2254 'timestamp': 1501941939.0,
2255 'title': 'That small heart attack.',
2256 'upload_date': '20170805',
2257 'uploader': 'Antw87'
2258 }
2259 },
2260 {
2261 # 1080p Reddit-hosted video that will redirect and be processed by RedditIE
2262 'url': 'https://v.redd.it/33hgok7dfbz71/',
2263 'md5': '7a1d587940242c9bb3bd6eb320b39258',
2264 'info_dict': {
2265 'id': '33hgok7dfbz71',
2266 'ext': 'mp4',
2267 'title': "The game Didn't want me to Knife that Guy I guess",
2268 'uploader': 'paraf1ve',
2269 'timestamp': 1636788683.0,
2270 'upload_date': '20211113'
2271 }
2272 },
2273 {
2274 # MainStreaming player
2275 'url': 'https://www.lactv.it/2021/10/03/lac-news24-la-settimana-03-10-2021/',
2276 'info_dict': {
2277 'id': 'EUlZfGWkGpOd',
2278 'title': 'La Settimana ',
2279 'description': '03 Ottobre ore 02:00',
2280 'ext': 'mp4',
2281 'live_status': 'not_live',
2282 'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster',
2283 'duration': 1512
2284 }
2285 },
2286 {
2287 # Multiple gfycat iframe embeds
2288 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
2289 'info_dict': {
2290 'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
2291 'id': 'board'
2292 },
2293 'playlist_count': 8,
2294 },
2295 {
2296 # Multiple gfycat gifs (direct links)
2297 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
2298 'info_dict': {
2299 'title': '옳게 된 크롭 니트 스테이씨 아이사',
2300 'id': 'board'
2301 },
2302 'playlist_count': 6
2303 },
2304 {
2305 # Multiple gfycat embeds, with uppercase "IFR" in urls
2306 'url': 'https://kkzz.kr/?vid=2295',
2307 'info_dict': {
2308 'title': '지방시 앰버서더 에스파 카리나 움짤',
2309 'id': '?vid=2295'
2310 },
2311 'playlist_count': 9
2312 },
2313 {
2314 # Panopto embeds
2315 'url': 'https://www.monash.edu/learning-teaching/teachhq/learning-technologies/panopto/how-to/insert-a-quiz-into-a-panopto-video',
2316 'info_dict': {
2317 'ext': 'mp4',
2318 'id': '0bd3f16c-824a-436a-8486-ac5900693aef',
2319 'title': 'Quizzes in Panopto',
2320 },
2321 },
2322 {
2323 # Ruutu embed
2324 'url': 'https://www.nelonen.fi/ohjelmat/madventures-suomi/2160731-riku-ja-tunna-lahtevat-peurajahtiin-tv-sta-tutun-biologin-kanssa---metsastysreissu-huipentuu-kasvissyojan-painajaiseen',
2325 'md5': 'a2513a98d3496099e6eced40f7e6a14b',
2326 'info_dict': {
2327 'id': '4044426',
2328 'ext': 'mp4',
2329 'title': 'Riku ja Tunna lähtevät peurajahtiin tv:stä tutun biologin kanssa – metsästysreissu huipentuu kasvissyöjän painajaiseen!',
2330 'thumbnail': r're:^https?://.+\.jpg$',
2331 'duration': 108,
2332 'series': 'Madventures Suomi',
2333 'description': 'md5:aa55b44bd06a1e337a6f1d0b46507381',
2334 'categories': ['Matkailu', 'Elämäntyyli'],
2335 'age_limit': 0,
2336 'upload_date': '20220308',
2337 },
2338 },
2339 {
2340 # Multiple Ruutu embeds
2341 'url': 'https://www.hs.fi/kotimaa/art-2000008762560.html',
2342 'info_dict': {
2343 'title': 'Koronavirus | Epidemiahuippu voi olla Suomessa ohi, mutta koronaviruksen poistamista yleisvaarallisten tautien joukosta harkitaan vasta syksyllä',
2344 'id': 'art-2000008762560'
2345 },
2346 'playlist_count': 3
2347 },
2348 {
2349 # Ruutu embed in hs.fi with a single video
2350 'url': 'https://www.hs.fi/kotimaa/art-2000008793421.html',
2351 'md5': 'f8964e65d8fada6e8a562389bf366bb4',
2352 'info_dict': {
2353 'id': '4081841',
2354 'ext': 'mp4',
2355 'title': 'Puolustusvoimat siirsi panssariajoneuvoja harjoituksiin Niinisaloon 2.5.2022',
2356 'thumbnail': r're:^https?://.+\.jpg$',
2357 'duration': 138,
2358 'age_limit': 0,
2359 'upload_date': '20220504',
2360 },
2361 },
2362 {
2363 # Webpage contains double BOM
2364 'url': 'https://www.filmarkivet.se/movies/paris-d-moll/',
2365 'md5': 'df02cadc719dcc63d43288366f037754',
2366 'info_dict': {
2367 'id': 'paris-d-moll',
2368 'ext': 'mp4',
2369 'upload_date': '20220518',
2370 'title': 'Paris d-moll',
2371 'description': 'md5:319e37ea5542293db37e1e13072fe330',
2372 'thumbnail': 'https://www.filmarkivet.se/wp-content/uploads/parisdmoll2.jpg',
2373 'timestamp': 1652833414,
2374 'age_limit': 0,
2375 }
2376 },
2377 {
2378 'url': 'https://www.mollymovieclub.com/p/interstellar?s=r#details',
2379 'md5': '198bde8bed23d0b23c70725c83c9b6d9',
2380 'info_dict': {
2381 'id': '53602801',
2382 'ext': 'mpga',
2383 'title': 'Interstellar',
2384 'description': 'Listen now | Episode One',
2385 'thumbnail': 'md5:c30d9c83f738e16d8551d7219d321538',
2386 'uploader': 'Molly Movie Club',
2387 'uploader_id': '839621',
2388 },
2389 },
2390 {
2391 'url': 'https://www.blockedandreported.org/p/episode-117-lets-talk-about-depp?s=r',
2392 'md5': 'c0cc44ee7415daeed13c26e5b56d6aa0',
2393 'info_dict': {
2394 'id': '57962052',
2395 'ext': 'mpga',
2396 'title': 'md5:855b2756f0ee10f6723fa00b16266f8d',
2397 'description': 'md5:fe512a5e94136ad260c80bde00ea4eef',
2398 'thumbnail': 'md5:2218f27dfe517bb5ac16c47d0aebac59',
2399 'uploader': 'Blocked and Reported',
2400 'uploader_id': '500230',
2401 },
2402 },
2403 {
2404 'url': 'https://www.skimag.com/video/ski-people-1980/',
2405 'md5': '022a7e31c70620ebec18deeab376ee03',
2406 'info_dict': {
2407 'id': 'YTmgRiNU',
2408 'ext': 'mp4',
2409 'title': '1980 Ski People',
2410 'timestamp': 1610407738,
2411 'description': 'md5:cf9c3d101452c91e141f292b19fe4843',
2412 'thumbnail': 'https://cdn.jwplayer.com/v2/media/YTmgRiNU/poster.jpg?width=720',
2413 'duration': 5688.0,
2414 'upload_date': '20210111',
2415 }
2416 },
2417 {
2418 'note': 'Rumble embed',
2419 'url': 'https://rumble.com/vdmum1-moose-the-dog-helps-girls-dig-a-snow-fort.html',
2420 'md5': '53af34098a7f92c4e51cf0bd1c33f009',
2421 'info_dict': {
2422 'id': 'vb0ofn',
2423 'ext': 'mp4',
2424 'timestamp': 1612662578,
2425 'uploader': 'LovingMontana',
2426 'channel': 'LovingMontana',
2427 'upload_date': '20210207',
2428 'title': 'Winter-loving dog helps girls dig a snow fort ',
2429 'channel_url': 'https://rumble.com/c/c-546523',
2430 'thumbnail': 'https://sp.rmbl.ws/s8/1/5/f/x/x/5fxxb.OvCc.1-small-Moose-The-Dog-Helps-Girls-D.jpg',
2431 'duration': 103,
2432 }
2433 },
2434 {
2435 'note': 'Rumble JS embed',
2436 'url': 'https://therightscoop.com/what-does-9-plus-1-plus-1-equal-listen-to-this-audio-of-attempted-kavanaugh-assassins-call-and-youll-get-it',
2437 'md5': '4701209ac99095592e73dbba21889690',
2438 'info_dict': {
2439 'id': 'v15eqxl',
2440 'ext': 'mp4',
2441 'channel': 'Mr Producer Media',
2442 'duration': 92,
2443 'title': '911 Audio From The Man Who Wanted To Kill Supreme Court Justice Kavanaugh',
2444 'channel_url': 'https://rumble.com/c/RichSementa',
2445 'thumbnail': 'https://sp.rmbl.ws/s8/1/P/j/f/A/PjfAe.OvCc-small-911-Audio-From-The-Man-Who-.jpg',
2446 'timestamp': 1654892716,
2447 'uploader': 'Mr Producer Media',
2448 'upload_date': '20220610',
2449 }
2450 },
2451 {
2452 'note': 'JSON LD with multiple @type',
2453 'url': 'https://www.nu.nl/280161/video/hoe-een-bladvlo-dit-verwoestende-japanse-onkruid-moet-vernietigen.html',
2454 'md5': 'c7949f34f57273013fb7ccb1156393db',
2455 'info_dict': {
2456 'id': 'ipy2AcGL',
2457 'ext': 'mp4',
2458 'description': 'md5:6a9d644bab0dc2dc06849c2505d8383d',
2459 'thumbnail': r're:https://media\.nu\.nl/m/.+\.jpg',
2460 'title': 'Hoe een bladvlo dit verwoestende Japanse onkruid moet vernietigen',
2461 'timestamp': 1586577474,
2462 'upload_date': '20200411',
2463 'age_limit': 0,
2464 'duration': 111.0,
2465 }
2466 },
2467 {
2468 'note': 'JSON LD with unexpected data type',
2469 'url': 'https://www.autoweek.nl/autotests/artikel/porsche-911-gt3-rs-rij-impressie-2/',
2470 'info_dict': {
2471 'id': 'porsche-911-gt3-rs-rij-impressie-2',
2472 'ext': 'mp4',
2473 'title': 'Test: Porsche 911 GT3 RS',
2474 '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.',
2475 'timestamp': 1664920902,
2476 'upload_date': '20221004',
2477 'thumbnail': r're:^https://media.autoweek.nl/m/.+\.jpg$',
2478 'age_limit': 0,
2479 'direct': True,
2480 }
2481 }
2482 ]
2483
2484 def report_following_redirect(self, new_url):
2485 """Report information extraction."""
2486 self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
2487
2488 def report_detected(self, name, num=1, note=None):
2489 if num > 1:
2490 name += 's'
2491 elif not num:
2492 return
2493 else:
2494 num = 'a'
2495
2496 self._downloader.write_debug(f'Identified {num} {name}{format_field(note, None, "; %s")}')
2497
2498 def _extract_rss(self, url, video_id, doc):
2499 NS_MAP = {
2500 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
2501 }
2502
2503 entries = []
2504 for it in doc.findall('./channel/item'):
2505 next_url = next(
2506 (e.attrib.get('url') for e in it.findall('./enclosure')),
2507 xpath_text(it, 'link', fatal=False))
2508 if not next_url:
2509 continue
2510
2511 guid = try_call(lambda: it.find('guid').text)
2512 if guid:
2513 next_url = smuggle_url(next_url, {'force_videoid': guid})
2514
2515 def itunes(key):
2516 return xpath_text(it, xpath_with_ns(f'./itunes:{key}', NS_MAP), default=None)
2517
2518 entries.append({
2519 '_type': 'url_transparent',
2520 'url': next_url,
2521 'title': try_call(lambda: it.find('title').text),
2522 'description': xpath_text(it, 'description', default=None),
2523 'timestamp': unified_timestamp(xpath_text(it, 'pubDate', default=None)),
2524 'duration': parse_duration(itunes('duration')),
2525 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
2526 'episode': itunes('title'),
2527 'episode_number': int_or_none(itunes('episode')),
2528 'season_number': int_or_none(itunes('season')),
2529 'age_limit': {'true': 18, 'yes': 18, 'false': 0, 'no': 0}.get((itunes('explicit') or '').lower()),
2530 })
2531
2532 return {
2533 '_type': 'playlist',
2534 'id': url,
2535 'title': try_call(lambda: doc.find('./channel/title').text),
2536 'description': try_call(lambda: doc.find('./channel/description').text),
2537 'entries': entries,
2538 }
2539
2540 def _kvs_getrealurl(self, video_url, license_code):
2541 if not video_url.startswith('function/0/'):
2542 return video_url # not obfuscated
2543
2544 url_path, _, url_query = video_url.partition('?')
2545 urlparts = url_path.split('/')[2:]
2546 license = self._kvs_getlicensetoken(license_code)
2547 newmagic = urlparts[5][:32]
2548
2549 for o in range(len(newmagic) - 1, -1, -1):
2550 new = ''
2551 l = (o + sum(int(n) for n in license[o:])) % 32
2552
2553 for i in range(0, len(newmagic)):
2554 if i == o:
2555 new += newmagic[l]
2556 elif i == l:
2557 new += newmagic[o]
2558 else:
2559 new += newmagic[i]
2560 newmagic = new
2561
2562 urlparts[5] = newmagic + urlparts[5][32:]
2563 return '/'.join(urlparts) + '?' + url_query
2564
2565 def _kvs_getlicensetoken(self, license):
2566 modlicense = license.replace('$', '').replace('0', '1')
2567 center = int(len(modlicense) / 2)
2568 fronthalf = int(modlicense[:center + 1])
2569 backhalf = int(modlicense[center:])
2570
2571 modlicense = str(4 * abs(fronthalf - backhalf))
2572 retval = ''
2573 for o in range(0, center + 1):
2574 for i in range(1, 5):
2575 retval += str((int(license[o + i]) + int(modlicense[o])) % 10)
2576 return retval
2577
2578 def _real_extract(self, url):
2579 if url.startswith('//'):
2580 return self.url_result(self.http_scheme() + url)
2581
2582 parsed_url = urllib.parse.urlparse(url)
2583 if not parsed_url.scheme:
2584 default_search = self.get_param('default_search')
2585 if default_search is None:
2586 default_search = 'fixup_error'
2587
2588 if default_search in ('auto', 'auto_warning', 'fixup_error'):
2589 if re.match(r'^[^\s/]+\.[^\s/]+/', url):
2590 self.report_warning('The url doesn\'t specify the protocol, trying with http')
2591 return self.url_result('http://' + url)
2592 elif default_search != 'fixup_error':
2593 if default_search == 'auto_warning':
2594 if re.match(r'^(?:url|URL)$', url):
2595 raise ExtractorError(
2596 'Invalid URL: %r . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url,
2597 expected=True)
2598 else:
2599 self.report_warning(
2600 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
2601 return self.url_result('ytsearch:' + url)
2602
2603 if default_search in ('error', 'fixup_error'):
2604 raise ExtractorError(
2605 '%r is not a valid URL. '
2606 'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%s" ) to search YouTube'
2607 % (url, url), expected=True)
2608 else:
2609 if ':' not in default_search:
2610 default_search += ':'
2611 return self.url_result(default_search + url)
2612
2613 original_url = url
2614 url, smuggled_data = unsmuggle_url(url, {})
2615 force_videoid = None
2616 is_intentional = smuggled_data.get('to_generic')
2617 if 'force_videoid' in smuggled_data:
2618 force_videoid = smuggled_data['force_videoid']
2619 video_id = force_videoid
2620 else:
2621 video_id = self._generic_id(url)
2622
2623 # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
2624 # making it impossible to download only chunk of the file (yet we need only 512kB to
2625 # test whether it's HTML or not). According to yt-dlp default Accept-Encoding
2626 # that will always result in downloading the whole file that is not desirable.
2627 # Therefore for extraction pass we have to override Accept-Encoding to any in order
2628 # to accept raw bytes and being able to download only a chunk.
2629 # It may probably better to solve this by checking Content-Type for application/octet-stream
2630 # after a HEAD request, but not sure if we can rely on this.
2631 full_response = self._request_webpage(url, video_id, headers={
2632 'Accept-Encoding': '*',
2633 **smuggled_data.get('http_headers', {})
2634 })
2635 new_url = full_response.geturl()
2636 if url != new_url:
2637 self.report_following_redirect(new_url)
2638 if force_videoid:
2639 new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
2640 return self.url_result(new_url)
2641
2642 info_dict = {
2643 'id': video_id,
2644 'title': self._generic_title(url),
2645 'timestamp': unified_timestamp(full_response.headers.get('Last-Modified'))
2646 }
2647
2648 # Check for direct link to a video
2649 content_type = full_response.headers.get('Content-Type', '').lower()
2650 m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
2651 if m:
2652 self.report_detected('direct video link')
2653 headers = smuggled_data.get('http_headers', {})
2654 format_id = str(m.group('format_id'))
2655 subtitles = {}
2656 if format_id.endswith('mpegurl'):
2657 formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
2658 elif format_id.endswith('mpd') or format_id.endswith('dash+xml'):
2659 formats, subtitles = self._extract_mpd_formats_and_subtitles(url, video_id, headers=headers)
2660 elif format_id == 'f4m':
2661 formats = self._extract_f4m_formats(url, video_id, headers=headers)
2662 else:
2663 formats = [{
2664 'format_id': format_id,
2665 'url': url,
2666 'vcodec': 'none' if m.group('type') == 'audio' else None
2667 }]
2668 info_dict['direct'] = True
2669 self._sort_formats(formats)
2670 info_dict.update({
2671 'formats': formats,
2672 'subtitles': subtitles,
2673 'http_headers': headers,
2674 })
2675 return info_dict
2676
2677 if not self.get_param('test', False) and not is_intentional:
2678 force = self.get_param('force_generic_extractor', False)
2679 self.report_warning('%s generic information extractor' % ('Forcing' if force else 'Falling back on'))
2680
2681 first_bytes = full_response.read(512)
2682
2683 # Is it an M3U playlist?
2684 if first_bytes.startswith(b'#EXTM3U'):
2685 self.report_detected('M3U playlist')
2686 info_dict['formats'], info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
2687 self._sort_formats(info_dict['formats'])
2688 return info_dict
2689
2690 # Maybe it's a direct link to a video?
2691 # Be careful not to download the whole thing!
2692 if not is_html(first_bytes):
2693 self.report_warning(
2694 'URL could be a direct video link, returning it as such.')
2695 info_dict.update({
2696 'direct': True,
2697 'url': url,
2698 })
2699 return info_dict
2700
2701 webpage = self._webpage_read_content(
2702 full_response, url, video_id, prefix=first_bytes)
2703
2704 if '<title>DPG Media Privacy Gate</title>' in webpage:
2705 webpage = self._download_webpage(url, video_id)
2706
2707 self.report_extraction(video_id)
2708
2709 # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
2710 try:
2711 try:
2712 doc = compat_etree_fromstring(webpage)
2713 except xml.etree.ElementTree.ParseError:
2714 doc = compat_etree_fromstring(webpage.encode('utf-8'))
2715 if doc.tag == 'rss':
2716 self.report_detected('RSS feed')
2717 return self._extract_rss(url, video_id, doc)
2718 elif doc.tag == 'SmoothStreamingMedia':
2719 info_dict['formats'], info_dict['subtitles'] = self._parse_ism_formats_and_subtitles(doc, url)
2720 self.report_detected('ISM manifest')
2721 self._sort_formats(info_dict['formats'])
2722 return info_dict
2723 elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
2724 smil = self._parse_smil(doc, url, video_id)
2725 self.report_detected('SMIL file')
2726 self._sort_formats(smil['formats'])
2727 return smil
2728 elif doc.tag == '{http://xspf.org/ns/0/}playlist':
2729 self.report_detected('XSPF playlist')
2730 return self.playlist_result(
2731 self._parse_xspf(
2732 doc, video_id, xspf_url=url,
2733 xspf_base_url=full_response.geturl()),
2734 video_id)
2735 elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
2736 info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles(
2737 doc,
2738 mpd_base_url=full_response.geturl().rpartition('/')[0],
2739 mpd_url=url)
2740 self.report_detected('DASH manifest')
2741 self._sort_formats(info_dict['formats'])
2742 return info_dict
2743 elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
2744 info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
2745 self.report_detected('F4M manifest')
2746 self._sort_formats(info_dict['formats'])
2747 return info_dict
2748 except xml.etree.ElementTree.ParseError:
2749 pass
2750
2751 info_dict.update({
2752 # it's tempting to parse this further, but you would
2753 # have to take into account all the variations like
2754 # Video Title - Site Name
2755 # Site Name | Video Title
2756 # Video Title - Tagline | Site Name
2757 # and so on and so forth; it's just not practical
2758 'title': (self._og_search_title(webpage, default=None)
2759 or self._html_extract_title(webpage, 'video title', default='video')),
2760 'description': self._og_search_description(webpage, default=None),
2761 'thumbnail': self._og_search_thumbnail(webpage, default=None),
2762 'age_limit': self._rta_search(webpage),
2763 })
2764
2765 self._downloader.write_debug('Looking for embeds')
2766 embeds = list(self._extract_embeds(original_url, webpage, urlh=full_response, info_dict=info_dict))
2767 if len(embeds) == 1:
2768 return {**info_dict, **embeds[0]}
2769 elif embeds:
2770 return self.playlist_result(embeds, **info_dict)
2771 raise UnsupportedError(url)
2772
2773 def _extract_embeds(self, url, webpage, *, urlh=None, info_dict={}):
2774 """Returns an iterator of video entries"""
2775 info_dict = types.MappingProxyType(info_dict) # Prevents accidental mutation
2776 video_id = traverse_obj(info_dict, 'display_id', 'id') or self._generic_id(url)
2777 url, smuggled_data = unsmuggle_url(url, {})
2778 actual_url = urlh.geturl() if urlh else url
2779
2780 # Sometimes embedded video player is hidden behind percent encoding
2781 # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448)
2782 # Unescaping the whole page allows to handle those cases in a generic way
2783 # FIXME: unescaping the whole page may break URLs, commenting out for now.
2784 # There probably should be a second run of generic extractor on unescaped webpage.
2785 # webpage = urllib.parse.unquote(webpage)
2786
2787 # Unescape squarespace embeds to be detected by generic extractor,
2788 # see https://github.com/ytdl-org/youtube-dl/issues/21294
2789 webpage = re.sub(
2790 r'<div[^>]+class=[^>]*?\bsqs-video-wrapper\b[^>]*>',
2791 lambda x: unescapeHTML(x.group(0)), webpage)
2792
2793 # TODO: Move to respective extractors
2794 bc_urls = BrightcoveLegacyIE._extract_brightcove_urls(webpage)
2795 if bc_urls:
2796 return [self.url_result(smuggle_url(bc_url, {'Referer': url}), BrightcoveLegacyIE)
2797 for bc_url in bc_urls]
2798 bc_urls = BrightcoveNewIE._extract_brightcove_urls(self, webpage)
2799 if bc_urls:
2800 return [self.url_result(smuggle_url(bc_url, {'Referer': url}), BrightcoveNewIE)
2801 for bc_url in bc_urls]
2802
2803 embeds = []
2804 for ie in self._downloader._ies.values():
2805 if ie.ie_key() in smuggled_data.get('block_ies', []):
2806 continue
2807 gen = ie.extract_from_webpage(self._downloader, url, webpage)
2808 current_embeds = []
2809 try:
2810 while True:
2811 current_embeds.append(next(gen))
2812 except self.StopExtraction:
2813 self.report_detected(f'{ie.IE_NAME} exclusive embed', len(current_embeds),
2814 embeds and 'discarding other embeds')
2815 return current_embeds
2816 except StopIteration:
2817 self.report_detected(f'{ie.IE_NAME} embed', len(current_embeds))
2818 embeds.extend(current_embeds)
2819
2820 if embeds:
2821 return embeds
2822
2823 jwplayer_data = self._find_jwplayer_data(
2824 webpage, video_id, transform_source=js_to_json)
2825 if jwplayer_data:
2826 if isinstance(jwplayer_data.get('playlist'), str):
2827 self.report_detected('JW Player playlist')
2828 return [self.url_result(jwplayer_data['playlist'], 'JWPlatform')]
2829 try:
2830 info = self._parse_jwplayer_data(
2831 jwplayer_data, video_id, require_title=False, base_url=url)
2832 if traverse_obj(info, 'formats', ('entries', ..., 'formats')):
2833 self.report_detected('JW Player data')
2834 return [info]
2835 except ExtractorError:
2836 # See https://github.com/ytdl-org/youtube-dl/pull/16735
2837 pass
2838
2839 # Video.js embed
2840 mobj = re.search(
2841 r'(?s)\bvideojs\s*\(.+?([a-zA-Z0-9_$]+)\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
2842 webpage)
2843 if mobj is not None:
2844 varname = mobj.group(1)
2845 sources = self._parse_json(
2846 mobj.group(2), video_id, transform_source=js_to_json,
2847 fatal=False) or []
2848 if not isinstance(sources, list):
2849 sources = [sources]
2850 formats = []
2851 subtitles = {}
2852 for source in sources:
2853 src = source.get('src')
2854 if not src or not isinstance(src, str):
2855 continue
2856 src = urllib.parse.urljoin(url, src)
2857 src_type = source.get('type')
2858 if isinstance(src_type, str):
2859 src_type = src_type.lower()
2860 ext = determine_ext(src).lower()
2861 if src_type == 'video/youtube':
2862 return [self.url_result(src, YoutubeIE.ie_key())]
2863 if src_type == 'application/dash+xml' or ext == 'mpd':
2864 fmts, subs = self._extract_mpd_formats_and_subtitles(
2865 src, video_id, mpd_id='dash', fatal=False)
2866 formats.extend(fmts)
2867 self._merge_subtitles(subs, target=subtitles)
2868 elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
2869 fmts, subs = self._extract_m3u8_formats_and_subtitles(
2870 src, video_id, 'mp4', entry_protocol='m3u8_native',
2871 m3u8_id='hls', fatal=False)
2872 formats.extend(fmts)
2873 self._merge_subtitles(subs, target=subtitles)
2874 else:
2875 formats.append({
2876 'url': src,
2877 'ext': (mimetype2ext(src_type)
2878 or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
2879 'http_headers': {
2880 'Referer': actual_url,
2881 },
2882 })
2883 # https://docs.videojs.com/player#addRemoteTextTrack
2884 # https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
2885 for sub_match in re.finditer(rf'(?s){re.escape(varname)}' r'\.addRemoteTextTrack\(({.+?})\s*,\s*(?:true|false)\)', webpage):
2886 sub = self._parse_json(
2887 sub_match.group(1), video_id, transform_source=js_to_json, fatal=False) or {}
2888 src = str_or_none(sub.get('src'))
2889 if not src:
2890 continue
2891 subtitles.setdefault(dict_get(sub, ('language', 'srclang')) or 'und', []).append({
2892 'url': urllib.parse.urljoin(url, src),
2893 'name': sub.get('label'),
2894 'http_headers': {
2895 'Referer': actual_url,
2896 },
2897 })
2898 if formats or subtitles:
2899 self.report_detected('video.js embed')
2900 self._sort_formats(formats)
2901 return [{'formats': formats, 'subtitles': subtitles}]
2902
2903 # Looking for http://schema.org/VideoObject
2904 json_ld = self._search_json_ld(webpage, video_id, default={})
2905 if json_ld.get('url') not in (url, None):
2906 self.report_detected('JSON LD')
2907 return [merge_dicts({
2908 '_type': 'video' if json_ld.get('ext') else 'url_transparent',
2909 'url': smuggle_url(json_ld['url'], {
2910 'force_videoid': video_id,
2911 'to_generic': True,
2912 'http_headers': {'Referer': url},
2913 }),
2914 }, json_ld)]
2915
2916 def check_video(vurl):
2917 if YoutubeIE.suitable(vurl):
2918 return True
2919 if RtmpIE.suitable(vurl):
2920 return True
2921 vpath = urllib.parse.urlparse(vurl).path
2922 vext = determine_ext(vpath, None)
2923 return vext not in (None, 'swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
2924
2925 def filter_video(urls):
2926 return list(filter(check_video, urls))
2927
2928 # Start with something easy: JW Player in SWFObject
2929 found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
2930 if found:
2931 self.report_detected('JW Player in SFWObject')
2932 else:
2933 # Look for gorilla-vid style embedding
2934 found = filter_video(re.findall(r'''(?sx)
2935 (?:
2936 jw_plugins|
2937 JWPlayerOptions|
2938 jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
2939 )
2940 .*?
2941 ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
2942 if found:
2943 self.report_detected('JW Player embed')
2944 if not found:
2945 # Look for generic KVS player
2946 found = re.search(r'<script [^>]*?src="https?://.+?/kt_player\.js\?v=(?P<ver>(?P<maj_ver>\d+)(\.\d+)+)".*?>', webpage)
2947 if found:
2948 self.report_detected('KWS Player')
2949 if found.group('maj_ver') not in ['4', '5']:
2950 self.report_warning('Untested major version (%s) in player engine--Download may fail.' % found.group('ver'))
2951 flashvars = re.search(r'(?ms)<script.*?>.*?var\s+flashvars\s*=\s*(\{.*?\});.*?</script>', webpage)
2952 flashvars = self._parse_json(flashvars.group(1), video_id, transform_source=js_to_json)
2953
2954 # extract the part after the last / as the display_id from the
2955 # canonical URL.
2956 display_id = self._search_regex(
2957 r'(?:<link href="https?://[^"]+/(.+?)/?" rel="canonical"\s*/?>'
2958 r'|<link rel="canonical" href="https?://[^"]+/(.+?)/?"\s*/?>)',
2959 webpage, 'display_id', fatal=False
2960 )
2961 title = self._html_search_regex(r'<(?:h1|title)>(?:Video: )?(.+?)</(?:h1|title)>', webpage, 'title')
2962
2963 thumbnail = flashvars['preview_url']
2964 if thumbnail.startswith('//'):
2965 protocol, _, _ = url.partition('/')
2966 thumbnail = protocol + thumbnail
2967
2968 url_keys = list(filter(re.compile(r'video_url|video_alt_url\d*').fullmatch, flashvars.keys()))
2969 formats = []
2970 for key in url_keys:
2971 if '/get_file/' not in flashvars[key]:
2972 continue
2973 format_id = flashvars.get(f'{key}_text', key)
2974 formats.append({
2975 'url': self._kvs_getrealurl(flashvars[key], flashvars['license_code']),
2976 'format_id': format_id,
2977 'ext': 'mp4',
2978 **(parse_resolution(format_id) or parse_resolution(flashvars[key]))
2979 })
2980 if not formats[-1].get('height'):
2981 formats[-1]['quality'] = 1
2982
2983 self._sort_formats(formats)
2984
2985 return [{
2986 'id': flashvars['video_id'],
2987 'display_id': display_id,
2988 'title': title,
2989 'thumbnail': thumbnail,
2990 'formats': formats,
2991 }]
2992 if not found:
2993 # Broaden the search a little bit
2994 found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
2995 if found:
2996 self.report_detected('video file')
2997 if not found:
2998 # Broaden the findall a little bit: JWPlayer JS loader
2999 found = filter_video(re.findall(
3000 r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
3001 if found:
3002 self.report_detected('JW Player JS loader')
3003 if not found:
3004 # Flow player
3005 found = filter_video(re.findall(r'''(?xs)
3006 flowplayer\("[^"]+",\s*
3007 \{[^}]+?\}\s*,
3008 \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
3009 ["']?url["']?\s*:\s*["']([^"']+)["']
3010 ''', webpage))
3011 if found:
3012 self.report_detected('Flow Player')
3013 if not found:
3014 # Cinerama player
3015 found = re.findall(
3016 r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
3017 if found:
3018 self.report_detected('Cinerama player')
3019 if not found:
3020 # Try to find twitter cards info
3021 # twitter:player:stream should be checked before twitter:player since
3022 # it is expected to contain a raw stream (see
3023 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
3024 found = filter_video(re.findall(
3025 r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
3026 if found:
3027 self.report_detected('Twitter card')
3028 if not found:
3029 # We look for Open Graph info:
3030 # We have to match any number spaces between elements, some sites try to align them, e.g.: statigr.am
3031 m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
3032 # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
3033 if m_video_type is not None:
3034 found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
3035 if found:
3036 self.report_detected('Open Graph video info')
3037 if not found:
3038 REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
3039 found = re.search(
3040 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
3041 r'(?:[a-z-]+="[^"]+"\s+)*?content="%s' % REDIRECT_REGEX,
3042 webpage)
3043 if not found:
3044 # Look also in Refresh HTTP header
3045 refresh_header = urlh and urlh.headers.get('Refresh')
3046 if refresh_header:
3047 found = re.search(REDIRECT_REGEX, refresh_header)
3048 if found:
3049 new_url = urllib.parse.urljoin(url, unescapeHTML(found.group(1)))
3050 if new_url != url:
3051 self.report_following_redirect(new_url)
3052 return [self.url_result(new_url)]
3053 else:
3054 found = None
3055
3056 if not found:
3057 # twitter:player is a https URL to iframe player that may or may not
3058 # be supported by yt-dlp thus this is checked the very last (see
3059 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
3060 embed_url = self._html_search_meta('twitter:player', webpage, default=None)
3061 if embed_url and embed_url != url:
3062 self.report_detected('twitter:player iframe')
3063 return [self.url_result(embed_url)]
3064
3065 if not found:
3066 return []
3067
3068 domain_name = self._search_regex(r'^(?:https?://)?([^/]*)/.*', url, 'video uploader', default=None)
3069
3070 entries = []
3071 for video_url in orderedSet(found):
3072 video_url = unescapeHTML(video_url)
3073 video_url = video_url.replace('\\/', '/')
3074 video_url = urllib.parse.urljoin(url, video_url)
3075 video_id = urllib.parse.unquote(os.path.basename(video_url))
3076
3077 # Sometimes, jwplayer extraction will result in a YouTube URL
3078 if YoutubeIE.suitable(video_url):
3079 entries.append(self.url_result(video_url, 'Youtube'))
3080 continue
3081
3082 video_id = os.path.splitext(video_id)[0]
3083 headers = {
3084 'referer': actual_url
3085 }
3086
3087 entry_info_dict = {
3088 'id': video_id,
3089 'uploader': domain_name,
3090 'title': info_dict['title'],
3091 'age_limit': info_dict['age_limit'],
3092 'http_headers': headers,
3093 }
3094
3095 if RtmpIE.suitable(video_url):
3096 entry_info_dict.update({
3097 '_type': 'url_transparent',
3098 'ie_key': RtmpIE.ie_key(),
3099 'url': video_url,
3100 })
3101 entries.append(entry_info_dict)
3102 continue
3103
3104 ext = determine_ext(video_url)
3105 if ext == 'smil':
3106 entry_info_dict = {**self._extract_smil_info(video_url, video_id), **entry_info_dict}
3107 elif ext == 'xspf':
3108 return [self._extract_xspf_playlist(video_url, video_id)]
3109 elif ext == 'm3u8':
3110 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers)
3111 elif ext == 'mpd':
3112 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers)
3113 elif ext == 'f4m':
3114 entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers)
3115 elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
3116 # Just matching .ism/manifest is not enough to be reliably sure
3117 # whether it's actually an ISM manifest or some other streaming
3118 # manifest since there are various streaming URL formats
3119 # possible (see [1]) as well as some other shenanigans like
3120 # .smil/manifest URLs that actually serve an ISM (see [2]) and
3121 # so on.
3122 # Thus the most reasonable way to solve this is to delegate
3123 # to generic extractor in order to look into the contents of
3124 # the manifest itself.
3125 # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
3126 # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
3127 entry_info_dict = self.url_result(
3128 smuggle_url(video_url, {'to_generic': True}),
3129 GenericIE.ie_key())
3130 else:
3131 entry_info_dict['url'] = video_url
3132
3133 if entry_info_dict.get('formats'):
3134 self._sort_formats(entry_info_dict['formats'])
3135
3136 entries.append(entry_info_dict)
3137
3138 if len(entries) > 1:
3139 for num, e in enumerate(entries, start=1):
3140 # 'url' results don't have a title
3141 if e.get('title') is not None:
3142 e['title'] = '%s (%d)' % (e['title'], num)
3143 return entries