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