]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/generic.py
[cleanup] Misc fixes
[yt-dlp.git] / yt_dlp / extractor / generic.py
1 # coding: utf-8
2
3 from __future__ import unicode_literals
4
5 import os
6 import re
7 import sys
8
9 from .common import InfoExtractor
10 from .youtube import YoutubeIE
11 from ..compat import (
12 compat_etree_fromstring,
13 compat_str,
14 compat_urllib_parse_unquote,
15 compat_urlparse,
16 compat_xml_parse_error,
17 )
18 from ..utils import (
19 determine_ext,
20 dict_get,
21 ExtractorError,
22 float_or_none,
23 HEADRequest,
24 int_or_none,
25 is_html,
26 js_to_json,
27 KNOWN_EXTENSIONS,
28 merge_dicts,
29 mimetype2ext,
30 orderedSet,
31 parse_duration,
32 parse_resolution,
33 sanitized_Request,
34 smuggle_url,
35 str_or_none,
36 unescapeHTML,
37 unified_timestamp,
38 unsmuggle_url,
39 UnsupportedError,
40 url_or_none,
41 xpath_attr,
42 xpath_text,
43 xpath_with_ns,
44 )
45 from .commonprotocols import RtmpIE
46 from .brightcove import (
47 BrightcoveLegacyIE,
48 BrightcoveNewIE,
49 )
50 from .nexx import (
51 NexxIE,
52 NexxEmbedIE,
53 )
54 from .nbc import NBCSportsVPlayerIE
55 from .ooyala import OoyalaIE
56 from .rutv import RUTVIE
57 from .tvc import TVCIE
58 from .sportbox import SportBoxIE
59 from .myvi import MyviIE
60 from .condenast import CondeNastIE
61 from .udn import UDNEmbedIE
62 from .senategov import SenateISVPIE
63 from .svt import SVTIE
64 from .pornhub import PornHubIE
65 from .xhamster import XHamsterEmbedIE
66 from .tnaflix import TNAFlixNetworkEmbedIE
67 from .drtuber import DrTuberIE
68 from .redtube import RedTubeIE
69 from .tube8 import Tube8IE
70 from .mofosex import MofosexEmbedIE
71 from .spankwire import SpankwireIE
72 from .youporn import YouPornIE
73 from .vimeo import (
74 VimeoIE,
75 VHXEmbedIE,
76 )
77 from .dailymotion import DailymotionIE
78 from .dailymail import DailyMailIE
79 from .onionstudios import OnionStudiosIE
80 from .viewlift import ViewLiftEmbedIE
81 from .mtv import MTVServicesEmbeddedIE
82 from .pladform import PladformIE
83 from .videomore import VideomoreIE
84 from .webcaster import WebcasterFeedIE
85 from .googledrive import GoogleDriveIE
86 from .jwplatform import JWPlatformIE
87 from .digiteka import DigitekaIE
88 from .arkena import ArkenaIE
89 from .instagram import InstagramIE
90 from .threeqsdn import ThreeQSDNIE
91 from .theplatform import ThePlatformIE
92 from .kaltura import KalturaIE
93 from .eagleplatform import EaglePlatformIE
94 from .facebook import FacebookIE
95 from .soundcloud import SoundcloudEmbedIE
96 from .tunein import TuneInBaseIE
97 from .vbox7 import Vbox7IE
98 from .dbtv import DBTVIE
99 from .piksel import PikselIE
100 from .videa import VideaIE
101 from .twentymin import TwentyMinutenIE
102 from .ustream import UstreamIE
103 from .arte import ArteTVEmbedIE
104 from .videopress import VideoPressIE
105 from .rutube import RutubeIE
106 from .glomex import GlomexEmbedIE
107 from .megatvcom import MegaTVComEmbedIE
108 from .ant1newsgr import Ant1NewsGrEmbedIE
109 from .limelight import LimelightBaseIE
110 from .anvato import AnvatoIE
111 from .washingtonpost import WashingtonPostIE
112 from .wistia import WistiaIE
113 from .mediaset import MediasetIE
114 from .joj import JojIE
115 from .megaphone import MegaphoneIE
116 from .vzaar import VzaarIE
117 from .channel9 import Channel9IE
118 from .vshare import VShareIE
119 from .mediasite import MediasiteIE
120 from .springboardplatform import SpringboardPlatformIE
121 from .ted import TedEmbedIE
122 from .yapfiles import YapFilesIE
123 from .vice import ViceIE
124 from .xfileshare import XFileShareIE
125 from .cloudflarestream import CloudflareStreamIE
126 from .peertube import PeerTubeIE
127 from .teachable import TeachableIE
128 from .indavideo import IndavideoEmbedIE
129 from .apa import APAIE
130 from .foxnews import FoxNewsIE
131 from .viqeo import ViqeoIE
132 from .expressen import ExpressenIE
133 from .zype import ZypeIE
134 from .odnoklassniki import OdnoklassnikiIE
135 from .vk import VKIE
136 from .kinja import KinjaEmbedIE
137 from .gedidigital import GediDigitalIE
138 from .rcs import RCSEmbedsIE
139 from .bitchute import BitChuteIE
140 from .rumble import RumbleEmbedIE
141 from .arcpublishing import ArcPublishingIE
142 from .medialaan import MedialaanIE
143 from .simplecast import SimplecastIE
144 from .wimtv import WimTVIE
145 from .tvopengr import TVOpenGrEmbedIE
146 from .ertgr import ERTWebtvEmbedIE
147 from .tvp import TVPEmbedIE
148 from .blogger import BloggerIE
149 from .mainstreaming import MainStreamingIE
150 from .gfycat import GfycatIE
151 from .panopto import PanoptoBaseIE
152 from .ruutu import RuutuIE
153
154
155 class GenericIE(InfoExtractor):
156 IE_DESC = 'Generic downloader that works on some sites'
157 _VALID_URL = r'.*'
158 IE_NAME = 'generic'
159 _NETRC_MACHINE = False # Supress username warning
160 _TESTS = [
161 # Direct link to a video
162 {
163 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
164 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
165 'info_dict': {
166 'id': 'trailer',
167 'ext': 'mp4',
168 'title': 'trailer',
169 'upload_date': '20100513',
170 }
171 },
172 # Direct link to media delivered compressed (until Accept-Encoding is *)
173 {
174 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
175 'md5': '128c42e68b13950268b648275386fc74',
176 'info_dict': {
177 'id': 'FictionJunction-Parallel_Hearts',
178 'ext': 'flac',
179 'title': 'FictionJunction-Parallel_Hearts',
180 'upload_date': '20140522',
181 },
182 'expected_warnings': [
183 'URL could be a direct video link, returning it as such.'
184 ],
185 'skip': 'URL invalid',
186 },
187 # Direct download with broken HEAD
188 {
189 'url': 'http://ai-radio.org:8000/radio.opus',
190 'info_dict': {
191 'id': 'radio',
192 'ext': 'opus',
193 'title': 'radio',
194 },
195 'params': {
196 'skip_download': True, # infinite live stream
197 },
198 'expected_warnings': [
199 r'501.*Not Implemented',
200 r'400.*Bad Request',
201 ],
202 },
203 # Direct link with incorrect MIME type
204 {
205 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
206 'md5': '4ccbebe5f36706d85221f204d7eb5913',
207 'info_dict': {
208 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
209 'id': '5_Lennart_Poettering_-_Systemd',
210 'ext': 'webm',
211 'title': '5_Lennart_Poettering_-_Systemd',
212 'upload_date': '20141120',
213 },
214 'expected_warnings': [
215 'URL could be a direct video link, returning it as such.'
216 ]
217 },
218 # RSS feed
219 {
220 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
221 'info_dict': {
222 'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
223 'title': 'Zero Punctuation',
224 'description': 're:.*groundbreaking video review series.*'
225 },
226 'playlist_mincount': 11,
227 },
228 # RSS feed with enclosure
229 {
230 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
231 'info_dict': {
232 'id': 'http://podcastfeeds.nbcnews.com/nbcnews/video/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
233 'title': 'MSNBC Rachel Maddow (video)',
234 'description': 're:.*her unique approach to storytelling.*',
235 },
236 'playlist': [{
237 'info_dict': {
238 'ext': 'mov',
239 'id': 'pdv_maddow_netcast_mov-12-03-2020-223726',
240 'title': 'MSNBC Rachel Maddow (video) - 12-03-2020-223726',
241 'description': 're:.*her unique approach to storytelling.*',
242 'upload_date': '20201204',
243 },
244 }],
245 },
246 # RSS feed with item with description and thumbnails
247 {
248 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
249 'info_dict': {
250 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
251 'title': 're:.*100% Hydrogen.*',
252 'description': 're:.*In this episode.*',
253 },
254 'playlist': [{
255 'info_dict': {
256 'ext': 'm4a',
257 'id': 'c1c879525ce2cb640b344507e682c36d',
258 'title': 're:Hydrogen!',
259 'description': 're:.*In this episode we are going.*',
260 'timestamp': 1567977776,
261 'upload_date': '20190908',
262 'duration': 459,
263 'thumbnail': r're:^https?://.*\.jpg$',
264 'episode_number': 1,
265 'season_number': 1,
266 'age_limit': 0,
267 'season': 'Season 1',
268 'direct': True,
269 'episode': 'Episode 1',
270 },
271 }],
272 'params': {
273 'skip_download': True,
274 },
275 },
276 # RSS feed with enclosures and unsupported link URLs
277 {
278 'url': 'http://www.hellointernet.fm/podcast?format=rss',
279 'info_dict': {
280 'id': 'http://www.hellointernet.fm/podcast?format=rss',
281 'description': 'CGP Grey and Brady Haran talk about YouTube, life, work, whatever.',
282 'title': 'Hello Internet',
283 },
284 'playlist_mincount': 100,
285 },
286 # RSS feed with guid
287 {
288 'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
289 'info_dict': {
290 'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
291 'description': 'md5:be809a44b63b0c56fb485caf68685520',
292 'title': 'The Little Red Podcast',
293 },
294 'playlist_mincount': 76,
295 },
296 # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
297 {
298 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
299 'info_dict': {
300 'id': 'smil',
301 'ext': 'mp4',
302 'title': 'Automatics, robotics and biocybernetics',
303 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
304 'upload_date': '20130627',
305 'formats': 'mincount:16',
306 'subtitles': 'mincount:1',
307 },
308 'params': {
309 'force_generic_extractor': True,
310 'skip_download': True,
311 },
312 },
313 # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
314 {
315 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
316 'info_dict': {
317 'id': 'hds',
318 'ext': 'flv',
319 'title': 'hds',
320 'formats': 'mincount:1',
321 },
322 'params': {
323 'skip_download': True,
324 },
325 },
326 # SMIL from https://www.restudy.dk/video/play/id/1637
327 {
328 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
329 'info_dict': {
330 'id': 'video_1637',
331 'ext': 'flv',
332 'title': 'video_1637',
333 'formats': 'mincount:3',
334 },
335 'params': {
336 'skip_download': True,
337 },
338 },
339 # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
340 {
341 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
342 'info_dict': {
343 'id': 'smil-service',
344 'ext': 'flv',
345 'title': 'smil-service',
346 'formats': 'mincount:1',
347 },
348 'params': {
349 'skip_download': True,
350 },
351 },
352 # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
353 {
354 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
355 'info_dict': {
356 'id': '4719370',
357 'ext': 'mp4',
358 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
359 'formats': 'mincount:3',
360 },
361 'params': {
362 'skip_download': True,
363 },
364 },
365 # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
366 {
367 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
368 'info_dict': {
369 'id': 'mZlp2ctYIUEB',
370 'ext': 'mp4',
371 'title': 'Tikibad ontruimd wegens brand',
372 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
373 'thumbnail': r're:^https?://.*\.jpg$',
374 'duration': 33,
375 },
376 'params': {
377 'skip_download': True,
378 },
379 },
380 # MPD from http://dash-mse-test.appspot.com/media.html
381 {
382 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
383 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
384 'info_dict': {
385 'id': 'car-20120827-manifest',
386 'ext': 'mp4',
387 'title': 'car-20120827-manifest',
388 'formats': 'mincount:9',
389 'upload_date': '20130904',
390 },
391 },
392 # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
393 {
394 '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',
395 'info_dict': {
396 'id': 'content',
397 'ext': 'mp4',
398 'title': 'content',
399 'formats': 'mincount:8',
400 },
401 'params': {
402 # m3u8 downloads
403 'skip_download': True,
404 },
405 'skip': 'video gone',
406 },
407 # m3u8 served with Content-Type: text/plain
408 {
409 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
410 'info_dict': {
411 'id': 'index',
412 'ext': 'mp4',
413 'title': 'index',
414 'upload_date': '20140720',
415 'formats': 'mincount:11',
416 },
417 'params': {
418 # m3u8 downloads
419 'skip_download': True,
420 },
421 'skip': 'video gone',
422 },
423 # google redirect
424 {
425 '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',
426 'info_dict': {
427 'id': 'cmQHVoWB5FY',
428 'ext': 'mp4',
429 'upload_date': '20130224',
430 'uploader_id': 'TheVerge',
431 'description': r're:^Chris Ziegler takes a look at the\.*',
432 'uploader': 'The Verge',
433 'title': 'First Firefox OS phones side-by-side',
434 },
435 'params': {
436 'skip_download': False,
437 }
438 },
439 {
440 # redirect in Refresh HTTP header
441 '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',
442 'info_dict': {
443 'id': 'pO8h3EaFRdo',
444 'ext': 'mp4',
445 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
446 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
447 'upload_date': '20150917',
448 'uploader_id': 'brtvofficial',
449 'uploader': 'Boiler Room',
450 },
451 'params': {
452 'skip_download': False,
453 },
454 },
455 {
456 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
457 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
458 'info_dict': {
459 'id': '13601338388002',
460 'ext': 'mp4',
461 'uploader': 'www.hodiho.fr',
462 'title': 'R\u00e9gis plante sa Jeep',
463 }
464 },
465 # bandcamp page with custom domain
466 {
467 'add_ie': ['Bandcamp'],
468 'url': 'http://bronyrock.com/track/the-pony-mash',
469 'info_dict': {
470 'id': '3235767654',
471 'ext': 'mp3',
472 'title': 'The Pony Mash',
473 'uploader': 'M_Pallante',
474 },
475 'skip': 'There is a limit of 200 free downloads / month for the test song',
476 },
477 {
478 # embedded brightcove video
479 # it also tests brightcove videos that need to set the 'Referer'
480 # in the http requests
481 'add_ie': ['BrightcoveLegacy'],
482 'url': 'http://www.bfmtv.com/video/bfmbusiness/cours-bourse/cours-bourse-l-analyse-technique-154522/',
483 'info_dict': {
484 'id': '2765128793001',
485 'ext': 'mp4',
486 'title': 'Le cours de bourse : l’analyse technique',
487 'description': 'md5:7e9ad046e968cb2d1114004aba466fd9',
488 'uploader': 'BFM BUSINESS',
489 },
490 'params': {
491 'skip_download': True,
492 },
493 },
494 {
495 # embedded with itemprop embedURL and video id spelled as `idVideo`
496 'add_id': ['BrightcoveLegacy'],
497 'url': 'http://bfmbusiness.bfmtv.com/mediaplayer/chroniques/olivier-delamarche/',
498 'info_dict': {
499 'id': '5255628253001',
500 'ext': 'mp4',
501 'title': 'md5:37c519b1128915607601e75a87995fc0',
502 'description': 'md5:37f7f888b434bb8f8cc8dbd4f7a4cf26',
503 'uploader': 'BFM BUSINESS',
504 'uploader_id': '876450612001',
505 'timestamp': 1482255315,
506 'upload_date': '20161220',
507 },
508 'params': {
509 'skip_download': True,
510 },
511 },
512 {
513 # https://github.com/ytdl-org/youtube-dl/issues/2253
514 'url': 'http://bcove.me/i6nfkrc3',
515 'md5': '0ba9446db037002366bab3b3eb30c88c',
516 'info_dict': {
517 'id': '3101154703001',
518 'ext': 'mp4',
519 'title': 'Still no power',
520 'uploader': 'thestar.com',
521 '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.',
522 },
523 'add_ie': ['BrightcoveLegacy'],
524 'skip': 'video gone',
525 },
526 {
527 'url': 'http://www.championat.com/video/football/v/87/87499.html',
528 'md5': 'fb973ecf6e4a78a67453647444222983',
529 'info_dict': {
530 'id': '3414141473001',
531 'ext': 'mp4',
532 'title': 'Видео. Удаление Дзагоева (ЦСКА)',
533 'description': 'Онлайн-трансляция матча ЦСКА - "Волга"',
534 'uploader': 'Championat',
535 },
536 },
537 {
538 # https://github.com/ytdl-org/youtube-dl/issues/3541
539 'add_ie': ['BrightcoveLegacy'],
540 'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
541 'info_dict': {
542 'id': '3866516442001',
543 'ext': 'mp4',
544 'title': 'Leer mij vrouwen kennen: Aflevering 1',
545 'description': 'Leer mij vrouwen kennen: Aflevering 1',
546 'uploader': 'SBS Broadcasting',
547 },
548 'skip': 'Restricted to Netherlands',
549 'params': {
550 'skip_download': True, # m3u8 download
551 },
552 },
553 {
554 # Brightcove video in <iframe>
555 'url': 'http://www.un.org/chinese/News/story.asp?NewsID=27724',
556 'md5': '36d74ef5e37c8b4a2ce92880d208b968',
557 'info_dict': {
558 'id': '5360463607001',
559 'ext': 'mp4',
560 'title': '叙利亚失明儿童在废墟上演唱《心跳》 呼吁获得正常童年生活',
561 'description': '联合国儿童基金会中东和北非区域大使、作曲家扎德·迪拉尼(Zade Dirani)在3月15日叙利亚冲突爆发7周年纪念日之际发布了为叙利亚谱写的歌曲《心跳》(HEARTBEAT),为受到六年冲突影响的叙利亚儿童发出强烈呐喊,呼吁世界做出共同努力,使叙利亚儿童重新获得享有正常童年生活的权利。',
562 'uploader': 'United Nations',
563 'uploader_id': '1362235914001',
564 'timestamp': 1489593889,
565 'upload_date': '20170315',
566 },
567 'add_ie': ['BrightcoveLegacy'],
568 },
569 {
570 # Brightcove with alternative playerID key
571 'url': 'http://www.nature.com/nmeth/journal/v9/n7/fig_tab/nmeth.2062_SV1.html',
572 'info_dict': {
573 'id': 'nmeth.2062_SV1',
574 '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',
575 },
576 'playlist': [{
577 'info_dict': {
578 'id': '2228375078001',
579 'ext': 'mp4',
580 'title': 'nmeth.2062-sv1',
581 'description': 'nmeth.2062-sv1',
582 'timestamp': 1363357591,
583 'upload_date': '20130315',
584 'uploader': 'Nature Publishing Group',
585 'uploader_id': '1964492299001',
586 },
587 }],
588 },
589 {
590 # Brightcove with UUID in videoPlayer
591 'url': 'http://www8.hp.com/cn/zh/home.html',
592 'info_dict': {
593 'id': '5255815316001',
594 'ext': 'mp4',
595 'title': 'Sprocket Video - China',
596 'description': 'Sprocket Video - China',
597 'uploader': 'HP-Video Gallery',
598 'timestamp': 1482263210,
599 'upload_date': '20161220',
600 'uploader_id': '1107601872001',
601 },
602 'params': {
603 'skip_download': True, # m3u8 download
604 },
605 'skip': 'video rotates...weekly?',
606 },
607 {
608 # Brightcove:new type [2].
609 'url': 'http://www.delawaresportszone.com/video-st-thomas-more-earns-first-trip-to-basketball-semis',
610 'md5': '2b35148fcf48da41c9fb4591650784f3',
611 'info_dict': {
612 'id': '5348741021001',
613 'ext': 'mp4',
614 'upload_date': '20170306',
615 'uploader_id': '4191638492001',
616 'timestamp': 1488769918,
617 'title': 'VIDEO: St. Thomas More earns first trip to basketball semis',
618
619 },
620 },
621 {
622 # Alternative brightcove <video> attributes
623 '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/',
624 'info_dict': {
625 'id': '81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche',
626 '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",
627 },
628 'playlist': [{
629 'md5': '732d22ba3d33f2f3fc253c39f8f36523',
630 'info_dict': {
631 'id': '5311302538001',
632 'ext': 'mp4',
633 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche",
634 'description': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche (France 2, 5 février 2017)",
635 'timestamp': 1486321708,
636 'upload_date': '20170205',
637 'uploader_id': '800000640001',
638 },
639 'only_matching': True,
640 }],
641 },
642 {
643 # Brightcove with UUID in videoPlayer
644 'url': 'http://www8.hp.com/cn/zh/home.html',
645 'info_dict': {
646 'id': '5255815316001',
647 'ext': 'mp4',
648 'title': 'Sprocket Video - China',
649 'description': 'Sprocket Video - China',
650 'uploader': 'HP-Video Gallery',
651 'timestamp': 1482263210,
652 'upload_date': '20161220',
653 'uploader_id': '1107601872001',
654 },
655 'params': {
656 'skip_download': True, # m3u8 download
657 },
658 },
659 # ooyala video
660 {
661 'url': 'http://www.rollingstone.com/music/videos/norwegian-dj-cashmere-cat-goes-spartan-on-with-me-premiere-20131219',
662 'md5': '166dd577b433b4d4ebfee10b0824d8ff',
663 'info_dict': {
664 'id': 'BwY2RxaTrTkslxOfcan0UCf0YqyvWysJ',
665 'ext': 'mp4',
666 'title': '2cc213299525360.mov', # that's what we get
667 'duration': 238.231,
668 },
669 'add_ie': ['Ooyala'],
670 },
671 {
672 # ooyala video embedded with http://player.ooyala.com/iframe.js
673 'url': 'http://www.macrumors.com/2015/07/24/steve-jobs-the-man-in-the-machine-first-trailer/',
674 'info_dict': {
675 'id': 'p0MGJndjoG5SOKqO_hZJuZFPB-Tr5VgB',
676 'ext': 'mp4',
677 'title': '"Steve Jobs: Man in the Machine" trailer',
678 'description': 'The first trailer for the Alex Gibney documentary "Steve Jobs: Man in the Machine."',
679 'duration': 135.427,
680 },
681 'params': {
682 'skip_download': True,
683 },
684 'skip': 'movie expired',
685 },
686 # ooyala video embedded with http://player.ooyala.com/static/v4/production/latest/core.min.js
687 {
688 'url': 'http://wnep.com/2017/07/22/steampunk-fest-comes-to-honesdale/',
689 'info_dict': {
690 'id': 'lwYWYxYzE6V5uJMjNGyKtwwiw9ZJD7t2',
691 'ext': 'mp4',
692 'title': 'Steampunk Fest Comes to Honesdale',
693 'duration': 43.276,
694 },
695 'params': {
696 'skip_download': True,
697 }
698 },
699 # embed.ly video
700 {
701 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
702 'info_dict': {
703 'id': '9ODmcdjQcHQ',
704 'ext': 'mp4',
705 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
706 'upload_date': '20140225',
707 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
708 'uploader': 'Tested',
709 'uploader_id': 'testedcom',
710 },
711 # No need to test YoutubeIE here
712 'params': {
713 'skip_download': True,
714 },
715 },
716 # funnyordie embed
717 {
718 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
719 'info_dict': {
720 'id': '18e820ec3f',
721 'ext': 'mp4',
722 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
723 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
724 },
725 # HEAD requests lead to endless 301, while GET is OK
726 'expected_warnings': ['301'],
727 },
728 # RUTV embed
729 {
730 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
731 'info_dict': {
732 'id': '776940',
733 'ext': 'mp4',
734 'title': 'Охотское море стало целиком российским',
735 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
736 },
737 'params': {
738 # m3u8 download
739 'skip_download': True,
740 },
741 },
742 # TVC embed
743 {
744 '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/',
745 'info_dict': {
746 'id': '55304',
747 'ext': 'mp4',
748 'title': 'Дошкольное воспитание',
749 },
750 },
751 # SportBox embed
752 {
753 'url': 'http://www.vestifinance.ru/articles/25753',
754 'info_dict': {
755 'id': '25753',
756 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
757 },
758 'playlist': [{
759 'info_dict': {
760 'id': '370908',
761 'title': 'Госзаказ. День 3',
762 'ext': 'mp4',
763 }
764 }, {
765 'info_dict': {
766 'id': '370905',
767 'title': 'Госзаказ. День 2',
768 'ext': 'mp4',
769 }
770 }, {
771 'info_dict': {
772 'id': '370902',
773 'title': 'Госзаказ. День 1',
774 'ext': 'mp4',
775 }
776 }],
777 'params': {
778 # m3u8 download
779 'skip_download': True,
780 },
781 },
782 # Myvi.ru embed
783 {
784 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
785 'info_dict': {
786 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
787 'ext': 'mp4',
788 'title': 'Ужастики, русский трейлер (2015)',
789 'thumbnail': r're:^https?://.*\.jpg$',
790 'duration': 153,
791 }
792 },
793 # XHamster embed
794 {
795 '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',
796 'info_dict': {
797 'id': 'showthread',
798 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
799 },
800 'playlist_mincount': 7,
801 # This forum does not allow <iframe> syntaxes anymore
802 # Now HTML tags are displayed as-is
803 'skip': 'No videos on this page',
804 },
805 # Embedded TED video
806 {
807 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
808 'md5': '65fdff94098e4a607385a60c5177c638',
809 'info_dict': {
810 'id': '1969',
811 'ext': 'mp4',
812 'title': 'Hidden miracles of the natural world',
813 'uploader': 'Louie Schwartzberg',
814 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
815 }
816 },
817 # nowvideo embed hidden behind percent encoding
818 {
819 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
820 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
821 'info_dict': {
822 'id': '06e53103ca9aa',
823 'ext': 'flv',
824 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
825 'description': 'No description',
826 },
827 },
828 # arte embed
829 {
830 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
831 'md5': '7653032cbb25bf6c80d80f217055fa43',
832 'info_dict': {
833 'id': '048195-004_PLUS7-F',
834 'ext': 'flv',
835 'title': 'X:enius',
836 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
837 'upload_date': '20140320',
838 },
839 'params': {
840 'skip_download': 'Requires rtmpdump'
841 },
842 'skip': 'video gone',
843 },
844 # francetv embed
845 {
846 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
847 'info_dict': {
848 'id': 'EV_30231',
849 'ext': 'mp4',
850 'title': 'Alcaline, le concert avec Calogero',
851 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
852 'upload_date': '20150226',
853 'timestamp': 1424989860,
854 'duration': 5400,
855 },
856 'params': {
857 # m3u8 downloads
858 'skip_download': True,
859 },
860 'expected_warnings': [
861 'Forbidden'
862 ]
863 },
864 # Condé Nast embed
865 {
866 'url': 'http://www.wired.com/2014/04/honda-asimo/',
867 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
868 'info_dict': {
869 'id': '53501be369702d3275860000',
870 'ext': 'mp4',
871 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
872 }
873 },
874 # Dailymotion embed
875 {
876 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
877 'md5': '441aeeb82eb72c422c7f14ec533999cd',
878 'info_dict': {
879 'id': 'k2mm4bCdJ6CQ2i7c8o2',
880 'ext': 'mp4',
881 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
882 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
883 'uploader': 'Spi0n',
884 'uploader_id': 'xgditw',
885 'upload_date': '20140425',
886 'timestamp': 1398441542,
887 },
888 'add_ie': ['Dailymotion'],
889 },
890 # DailyMail embed
891 {
892 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
893 'info_dict': {
894 'id': '1495629',
895 'ext': 'mp4',
896 'title': 'Care worker punches elderly dementia patient in head 11 times',
897 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
898 },
899 'add_ie': ['DailyMail'],
900 'params': {
901 'skip_download': True,
902 },
903 },
904 # YouTube embed
905 {
906 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
907 'info_dict': {
908 'id': 'FXRb4ykk4S0',
909 'ext': 'mp4',
910 'title': 'The NBL Auction 2014',
911 'uploader': 'BADMINTON England',
912 'uploader_id': 'BADMINTONEvents',
913 'upload_date': '20140603',
914 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
915 },
916 'add_ie': ['Youtube'],
917 'params': {
918 'skip_download': True,
919 }
920 },
921 # MTVServices embed
922 {
923 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
924 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
925 'info_dict': {
926 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
927 'ext': 'mp4',
928 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
929 'description': 'Two valets share their love for movie star Liam Neesons.',
930 'timestamp': 1349922600,
931 'upload_date': '20121011',
932 },
933 },
934 # YouTube embed via <data-embed-url="">
935 {
936 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
937 'info_dict': {
938 'id': '4vAffPZIT44',
939 'ext': 'mp4',
940 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
941 'uploader': 'Gameloft',
942 'uploader_id': 'gameloft',
943 'upload_date': '20140828',
944 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
945 },
946 'params': {
947 'skip_download': True,
948 }
949 },
950 # YouTube <object> embed
951 {
952 'url': 'http://www.improbable.com/2017/04/03/untrained-modern-youths-and-ancient-masters-in-selfie-portraits/',
953 'md5': '516718101ec834f74318df76259fb3cc',
954 'info_dict': {
955 'id': 'msN87y-iEx0',
956 'ext': 'webm',
957 'title': 'Feynman: Mirrors FUN TO IMAGINE 6',
958 'upload_date': '20080526',
959 'description': 'md5:0ffc78ea3f01b2e2c247d5f8d1d3c18d',
960 'uploader': 'Christopher Sykes',
961 'uploader_id': 'ChristopherJSykes',
962 },
963 'add_ie': ['Youtube'],
964 },
965 # Camtasia studio
966 {
967 'url': 'http://www.ll.mit.edu/workshops/education/videocourses/antennas/lecture1/video/',
968 'playlist': [{
969 'md5': '0c5e352edabf715d762b0ad4e6d9ee67',
970 'info_dict': {
971 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
972 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - video1',
973 'ext': 'flv',
974 'duration': 2235.90,
975 }
976 }, {
977 'md5': '10e4bb3aaca9fd630e273ff92d9f3c63',
978 'info_dict': {
979 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final_PIP',
980 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - pip',
981 'ext': 'flv',
982 'duration': 2235.93,
983 }
984 }],
985 'info_dict': {
986 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
987 }
988 },
989 # Flowplayer
990 {
991 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
992 'md5': '9d65602bf31c6e20014319c7d07fba27',
993 'info_dict': {
994 'id': '5123ea6d5e5a7',
995 'ext': 'mp4',
996 'age_limit': 18,
997 'uploader': 'www.handjobhub.com',
998 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
999 }
1000 },
1001 # Multiple brightcove videos
1002 # https://github.com/ytdl-org/youtube-dl/issues/2283
1003 {
1004 'url': 'http://www.newyorker.com/online/blogs/newsdesk/2014/01/always-never-nuclear-command-and-control.html',
1005 'info_dict': {
1006 'id': 'always-never',
1007 'title': 'Always / Never - The New Yorker',
1008 },
1009 'playlist_count': 3,
1010 'params': {
1011 'extract_flat': False,
1012 'skip_download': True,
1013 }
1014 },
1015 # MLB embed
1016 {
1017 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
1018 'md5': '96f09a37e44da40dd083e12d9a683327',
1019 'info_dict': {
1020 'id': '33322633',
1021 'ext': 'mp4',
1022 'title': 'Ump changes call to ball',
1023 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
1024 'duration': 48,
1025 'timestamp': 1401537900,
1026 'upload_date': '20140531',
1027 'thumbnail': r're:^https?://.*\.jpg$',
1028 },
1029 },
1030 # Wistia embed
1031 {
1032 'url': 'http://study.com/academy/lesson/north-american-exploration-failed-colonies-of-spain-france-england.html#lesson',
1033 'md5': '1953f3a698ab51cfc948ed3992a0b7ff',
1034 'info_dict': {
1035 'id': '6e2wtrbdaf',
1036 'ext': 'mov',
1037 'title': 'paywall_north-american-exploration-failed-colonies-of-spain-france-england',
1038 'description': 'a Paywall Videos video from Remilon',
1039 'duration': 644.072,
1040 'uploader': 'study.com',
1041 'timestamp': 1459678540,
1042 'upload_date': '20160403',
1043 'filesize': 24687186,
1044 },
1045 },
1046 {
1047 'url': 'http://thoughtworks.wistia.com/medias/uxjb0lwrcz',
1048 'md5': 'baf49c2baa8a7de5f3fc145a8506dcd4',
1049 'info_dict': {
1050 'id': 'uxjb0lwrcz',
1051 'ext': 'mp4',
1052 'title': 'Conversation about Hexagonal Rails Part 1',
1053 'description': 'a Martin Fowler video from ThoughtWorks',
1054 'duration': 1715.0,
1055 'uploader': 'thoughtworks.wistia.com',
1056 'timestamp': 1401832161,
1057 'upload_date': '20140603',
1058 },
1059 },
1060 # Wistia standard embed (async)
1061 {
1062 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
1063 'info_dict': {
1064 'id': '807fafadvk',
1065 'ext': 'mp4',
1066 'title': 'Drip Brennan Dunn Workshop',
1067 'description': 'a JV Webinars video from getdrip-1',
1068 'duration': 4986.95,
1069 'timestamp': 1463607249,
1070 'upload_date': '20160518',
1071 },
1072 'params': {
1073 'skip_download': True,
1074 }
1075 },
1076 # Soundcloud embed
1077 {
1078 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
1079 'info_dict': {
1080 'id': '174391317',
1081 'ext': 'mp3',
1082 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
1083 'uploader': 'Sophos Security',
1084 'title': 'Chet Chat 171 - Oct 29, 2014',
1085 'upload_date': '20141029',
1086 }
1087 },
1088 # Soundcloud multiple embeds
1089 {
1090 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
1091 'info_dict': {
1092 'id': '52809',
1093 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
1094 },
1095 'playlist_mincount': 7,
1096 },
1097 # TuneIn station embed
1098 {
1099 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
1100 'info_dict': {
1101 'id': '204146',
1102 'ext': 'mp3',
1103 'title': 'CNRV',
1104 'location': 'Paris, France',
1105 'is_live': True,
1106 },
1107 'params': {
1108 # Live stream
1109 'skip_download': True,
1110 },
1111 },
1112 # Livestream embed
1113 {
1114 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
1115 'info_dict': {
1116 'id': '67864563',
1117 'ext': 'flv',
1118 'upload_date': '20141112',
1119 'title': 'Rosetta #CometLanding webcast HL 10',
1120 }
1121 },
1122 # Another Livestream embed, without 'new.' in URL
1123 {
1124 'url': 'https://www.freespeech.org/',
1125 'info_dict': {
1126 'id': '123537347',
1127 'ext': 'mp4',
1128 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
1129 },
1130 'params': {
1131 # Live stream
1132 'skip_download': True,
1133 },
1134 },
1135 # LazyYT
1136 {
1137 'url': 'https://skiplagged.com/',
1138 'info_dict': {
1139 'id': 'skiplagged',
1140 'title': 'Skiplagged: The smart way to find cheap flights',
1141 },
1142 'playlist_mincount': 1,
1143 'add_ie': ['Youtube'],
1144 },
1145 # Cinchcast embed
1146 {
1147 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
1148 'info_dict': {
1149 'id': '7141703',
1150 'ext': 'mp3',
1151 'upload_date': '20141126',
1152 'title': 'Jack Tips: 5 Steps to Permanent Gut Healing',
1153 }
1154 },
1155 # Cinerama player
1156 {
1157 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
1158 'info_dict': {
1159 'id': '730m_DandD_1901_512k',
1160 'ext': 'mp4',
1161 'uploader': 'www.abc.net.au',
1162 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
1163 }
1164 },
1165 # embedded viddler video
1166 {
1167 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
1168 'info_dict': {
1169 'id': '4d03aad9',
1170 'ext': 'mp4',
1171 'uploader': 'deadspin',
1172 'title': 'WALL-TO-GORTAT',
1173 'timestamp': 1422285291,
1174 'upload_date': '20150126',
1175 },
1176 'add_ie': ['Viddler'],
1177 },
1178 # Libsyn embed
1179 {
1180 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
1181 'info_dict': {
1182 'id': '3377616',
1183 'ext': 'mp3',
1184 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
1185 'description': 'md5:601cb790edd05908957dae8aaa866465',
1186 'upload_date': '20150220',
1187 },
1188 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
1189 },
1190 # jwplayer YouTube
1191 {
1192 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
1193 'info_dict': {
1194 'id': 'Mrj4DVp2zeA',
1195 'ext': 'mp4',
1196 'upload_date': '20150212',
1197 'uploader': 'The National Archives UK',
1198 'description': 'md5:8078af856dca76edc42910b61273dbbf',
1199 'uploader_id': 'NationalArchives08',
1200 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
1201 },
1202 },
1203 # jwplayer rtmp
1204 {
1205 'url': 'http://www.suffolk.edu/sjc/live.php',
1206 'info_dict': {
1207 'id': 'live',
1208 'ext': 'flv',
1209 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
1210 'uploader': 'www.suffolk.edu',
1211 },
1212 'params': {
1213 'skip_download': True,
1214 },
1215 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
1216 },
1217 # jwplayer with only the json URL
1218 {
1219 'url': 'https://www.hollywoodreporter.com/news/general-news/dunkirk-team-reveals-what-christopher-nolan-said-oscar-win-meet-your-oscar-winner-1092454',
1220 'info_dict': {
1221 'id': 'TljWkvWH',
1222 'ext': 'mp4',
1223 'upload_date': '20180306',
1224 'title': 'md5:91eb1862f6526415214f62c00b453936',
1225 'description': 'md5:73048ae50ae953da10549d1d2fe9b3aa',
1226 'timestamp': 1520367225,
1227 },
1228 'params': {
1229 'skip_download': True,
1230 },
1231 },
1232 # Complex jwplayer
1233 {
1234 'url': 'http://www.indiedb.com/games/king-machine/videos',
1235 'info_dict': {
1236 'id': 'videos',
1237 'ext': 'mp4',
1238 'title': 'king machine trailer 1',
1239 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
1240 'thumbnail': r're:^https?://.*\.jpg$',
1241 },
1242 },
1243 {
1244 # JWPlayer config passed as variable
1245 'url': 'http://www.txxx.com/videos/3326530/ariele/',
1246 'info_dict': {
1247 'id': '3326530_hq',
1248 'ext': 'mp4',
1249 'title': 'ARIELE | Tube Cup',
1250 'uploader': 'www.txxx.com',
1251 'age_limit': 18,
1252 },
1253 'params': {
1254 'skip_download': True,
1255 }
1256 },
1257 {
1258 # JWPlatform iframe
1259 'url': 'https://www.covermagazine.co.uk/feature/2465255/business-protection-involved',
1260 'info_dict': {
1261 'id': 'AG26UQXM',
1262 'ext': 'mp4',
1263 'upload_date': '20160719',
1264 'timestamp': 468923808,
1265 'title': '2016_05_18 Cover L&G Business Protection V1 FINAL.mp4',
1266 },
1267 'add_ie': [JWPlatformIE.ie_key()],
1268 },
1269 {
1270 # Video.js embed, multiple formats
1271 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
1272 'info_dict': {
1273 'id': 'yygqldloqIk',
1274 'ext': 'mp4',
1275 'title': 'SolidWorks. Урок 6 Настройка чертежа',
1276 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
1277 'upload_date': '20130314',
1278 'uploader': 'PROстое3D',
1279 'uploader_id': 'PROstoe3D',
1280 },
1281 'params': {
1282 'skip_download': True,
1283 },
1284 },
1285 {
1286 # Video.js embed, single format
1287 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
1288 'info_dict': {
1289 'id': 'watch',
1290 'ext': 'mp4',
1291 'title': 'Step 1 - Good Foundation',
1292 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
1293 },
1294 'params': {
1295 'skip_download': True,
1296 },
1297 },
1298 # rtl.nl embed
1299 {
1300 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
1301 'playlist_mincount': 5,
1302 'info_dict': {
1303 'id': 'aanslagen-kopenhagen',
1304 'title': 'Aanslagen Kopenhagen',
1305 }
1306 },
1307 # Zapiks embed
1308 {
1309 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
1310 'info_dict': {
1311 'id': '118046',
1312 'ext': 'mp4',
1313 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
1314 }
1315 },
1316 # Kaltura embed (different embed code)
1317 {
1318 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
1319 'info_dict': {
1320 'id': '1_a52wc67y',
1321 'ext': 'flv',
1322 'upload_date': '20150127',
1323 'uploader_id': 'PremierMedia',
1324 'timestamp': int,
1325 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
1326 },
1327 },
1328 # Kaltura embed with single quotes
1329 {
1330 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
1331 'info_dict': {
1332 'id': '0_izeg5utt',
1333 'ext': 'mp4',
1334 'title': '35871',
1335 'timestamp': 1355743100,
1336 'upload_date': '20121217',
1337 'uploader_id': 'cplapp@learn360.com',
1338 },
1339 'add_ie': ['Kaltura'],
1340 },
1341 {
1342 # Kaltura embedded via quoted entry_id
1343 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
1344 'info_dict': {
1345 'id': '0_utuok90b',
1346 'ext': 'mp4',
1347 'title': '06_matthew_brender_raj_dutt',
1348 'timestamp': 1466638791,
1349 'upload_date': '20160622',
1350 },
1351 'add_ie': ['Kaltura'],
1352 'expected_warnings': [
1353 'Could not send HEAD request'
1354 ],
1355 'params': {
1356 'skip_download': True,
1357 }
1358 },
1359 {
1360 # Kaltura embedded, some fileExt broken (#11480)
1361 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
1362 'info_dict': {
1363 'id': '1_sgtvehim',
1364 'ext': 'mp4',
1365 'title': 'Our "Standard Models" of particle physics and cosmology',
1366 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
1367 'timestamp': 1321158993,
1368 'upload_date': '20111113',
1369 'uploader_id': 'kps1',
1370 },
1371 'add_ie': ['Kaltura'],
1372 },
1373 {
1374 # Kaltura iframe embed
1375 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
1376 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
1377 'info_dict': {
1378 'id': '0_f2cfbpwy',
1379 'ext': 'mp4',
1380 'title': 'I. M. Pei: A Centennial Celebration',
1381 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
1382 'upload_date': '20170403',
1383 'uploader_id': 'batchUser',
1384 'timestamp': 1491232186,
1385 },
1386 'add_ie': ['Kaltura'],
1387 },
1388 {
1389 # Kaltura iframe embed, more sophisticated
1390 'url': 'http://www.cns.nyu.edu/~eero/math-tools/Videos/lecture-05sep2017.html',
1391 'info_dict': {
1392 'id': '1_9gzouybz',
1393 'ext': 'mp4',
1394 'title': 'lecture-05sep2017',
1395 'description': 'md5:40f347d91fd4ba047e511c5321064b49',
1396 'upload_date': '20170913',
1397 'uploader_id': 'eps2',
1398 'timestamp': 1505340777,
1399 },
1400 'params': {
1401 'skip_download': True,
1402 },
1403 'add_ie': ['Kaltura'],
1404 },
1405 {
1406 # meta twitter:player
1407 'url': 'http://thechive.com/2017/12/08/all-i-want-for-christmas-is-more-twerk/',
1408 'info_dict': {
1409 'id': '0_01b42zps',
1410 'ext': 'mp4',
1411 'title': 'Main Twerk (Video)',
1412 'upload_date': '20171208',
1413 'uploader_id': 'sebastian.salinas@thechive.com',
1414 'timestamp': 1512713057,
1415 },
1416 'params': {
1417 'skip_download': True,
1418 },
1419 'add_ie': ['Kaltura'],
1420 },
1421 # referrer protected EaglePlatform embed
1422 {
1423 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
1424 'info_dict': {
1425 'id': '582306',
1426 'ext': 'mp4',
1427 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
1428 'thumbnail': r're:^https?://.*\.jpg$',
1429 'duration': 3382,
1430 'view_count': int,
1431 },
1432 'params': {
1433 'skip_download': True,
1434 },
1435 },
1436 # ClipYou (EaglePlatform) embed (custom URL)
1437 {
1438 'url': 'http://muz-tv.ru/play/7129/',
1439 # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
1440 'info_dict': {
1441 'id': '12820',
1442 'ext': 'mp4',
1443 'title': "'O Sole Mio",
1444 'thumbnail': r're:^https?://.*\.jpg$',
1445 'duration': 216,
1446 'view_count': int,
1447 },
1448 'params': {
1449 'skip_download': True,
1450 },
1451 'skip': 'This video is unavailable.',
1452 },
1453 # Pladform embed
1454 {
1455 'url': 'http://muz-tv.ru/kinozal/view/7400/',
1456 'info_dict': {
1457 'id': '100183293',
1458 'ext': 'mp4',
1459 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
1460 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
1461 'thumbnail': r're:^https?://.*\.jpg$',
1462 'duration': 694,
1463 'age_limit': 0,
1464 },
1465 'skip': 'HTTP Error 404: Not Found',
1466 },
1467 # Playwire embed
1468 {
1469 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
1470 'info_dict': {
1471 'id': '3519514',
1472 'ext': 'mp4',
1473 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
1474 'thumbnail': r're:^https?://.*\.png$',
1475 'duration': 45.115,
1476 },
1477 },
1478 # Crooks and Liars embed
1479 {
1480 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
1481 'info_dict': {
1482 'id': '8RUoRhRi',
1483 'ext': 'mp4',
1484 'title': "Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!",
1485 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
1486 'timestamp': 1428207000,
1487 'upload_date': '20150405',
1488 'uploader': 'Heather',
1489 },
1490 },
1491 # Crooks and Liars external embed
1492 {
1493 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
1494 'info_dict': {
1495 'id': 'MTE3MjUtMzQ2MzA',
1496 'ext': 'mp4',
1497 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
1498 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
1499 'timestamp': 1265032391,
1500 'upload_date': '20100201',
1501 'uploader': 'Heather',
1502 },
1503 },
1504 # NBC Sports vplayer embed
1505 {
1506 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
1507 'info_dict': {
1508 'id': 'ln7x1qSThw4k',
1509 'ext': 'flv',
1510 'title': "PFT Live: New leader in the 'new-look' defense",
1511 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
1512 'uploader': 'NBCU-SPORTS',
1513 'upload_date': '20140107',
1514 'timestamp': 1389118457,
1515 },
1516 'skip': 'Invalid Page URL',
1517 },
1518 # NBC News embed
1519 {
1520 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
1521 'md5': '1aa589c675898ae6d37a17913cf68d66',
1522 'info_dict': {
1523 'id': 'x_dtl_oa_LettermanliftPR_160608',
1524 'ext': 'mp4',
1525 'title': 'David Letterman: A Preview',
1526 '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.',
1527 'upload_date': '20160609',
1528 'timestamp': 1465431544,
1529 'uploader': 'NBCU-NEWS',
1530 },
1531 },
1532 # UDN embed
1533 {
1534 'url': 'https://video.udn.com/news/300346',
1535 'md5': 'fd2060e988c326991037b9aff9df21a6',
1536 'info_dict': {
1537 'id': '300346',
1538 'ext': 'mp4',
1539 'title': '中一中男師變性 全校師生力挺',
1540 'thumbnail': r're:^https?://.*\.jpg$',
1541 },
1542 'params': {
1543 # m3u8 download
1544 'skip_download': True,
1545 },
1546 'expected_warnings': ['Failed to parse JSON Expecting value'],
1547 },
1548 # Brightcove URL in single quotes
1549 {
1550 'url': 'http://www.sportsnet.ca/baseball/mlb/sn-presents-russell-martin-world-citizen/',
1551 'md5': '4ae374f1f8b91c889c4b9203c8c752af',
1552 'info_dict': {
1553 'id': '4255764656001',
1554 'ext': 'mp4',
1555 'title': 'SN Presents: Russell Martin, World Citizen',
1556 '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.',
1557 'uploader': 'Rogers Sportsnet',
1558 'uploader_id': '1704050871',
1559 'upload_date': '20150525',
1560 'timestamp': 1432570283,
1561 },
1562 },
1563 # Kinja embed
1564 {
1565 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
1566 'info_dict': {
1567 'id': '106351',
1568 'ext': 'mp4',
1569 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
1570 'description': 'Migrated from OnionStudios',
1571 'thumbnail': r're:^https?://.*\.jpe?g$',
1572 'uploader': 'clickhole',
1573 'upload_date': '20150527',
1574 'timestamp': 1432744860,
1575 }
1576 },
1577 # SnagFilms embed
1578 {
1579 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
1580 'info_dict': {
1581 'id': '74849a00-85a9-11e1-9660-123139220831',
1582 'ext': 'mp4',
1583 'title': '#whilewewatch',
1584 }
1585 },
1586 # AdobeTVVideo embed
1587 {
1588 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
1589 'md5': '43662b577c018ad707a63766462b1e87',
1590 'info_dict': {
1591 'id': '2456',
1592 'ext': 'mp4',
1593 'title': 'New experience with Acrobat DC',
1594 'description': 'New experience with Acrobat DC',
1595 'duration': 248.667,
1596 },
1597 },
1598 # BrightcoveInPageEmbed embed
1599 {
1600 'url': 'http://www.geekandsundry.com/tabletop-bonus-wils-final-thoughts-on-dread/',
1601 'info_dict': {
1602 'id': '4238694884001',
1603 'ext': 'flv',
1604 'title': 'Tabletop: Dread, Last Thoughts',
1605 'description': 'Tabletop: Dread, Last Thoughts',
1606 'duration': 51690,
1607 },
1608 },
1609 # Brightcove embed, with no valid 'renditions' but valid 'IOSRenditions'
1610 # This video can't be played in browsers if Flash disabled and UA set to iPhone, which is actually a false alarm
1611 {
1612 'url': 'https://dl.dropboxusercontent.com/u/29092637/interview.html',
1613 'info_dict': {
1614 'id': '4785848093001',
1615 'ext': 'mp4',
1616 'title': 'The Cardinal Pell Interview',
1617 'description': 'Sky News Contributor Andrew Bolt interviews George Pell in Rome, following the Cardinal\'s evidence before the Royal Commission into Child Abuse. ',
1618 'uploader': 'GlobeCast Australia - GlobeStream',
1619 'uploader_id': '2733773828001',
1620 'upload_date': '20160304',
1621 'timestamp': 1457083087,
1622 },
1623 'params': {
1624 # m3u8 downloads
1625 'skip_download': True,
1626 },
1627 },
1628 {
1629 # Brightcove embed with whitespace around attribute names
1630 'url': 'http://www.stack.com/video/3167554373001/learn-to-hit-open-three-pointers-with-damian-lillard-s-baseline-drift-drill',
1631 'info_dict': {
1632 'id': '3167554373001',
1633 'ext': 'mp4',
1634 'title': "Learn to Hit Open Three-Pointers With Damian Lillard's Baseline Drift Drill",
1635 'description': 'md5:57bacb0e0f29349de4972bfda3191713',
1636 'uploader_id': '1079349493',
1637 'upload_date': '20140207',
1638 'timestamp': 1391810548,
1639 },
1640 'params': {
1641 'skip_download': True,
1642 },
1643 },
1644 # Another form of arte.tv embed
1645 {
1646 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
1647 'md5': '850bfe45417ddf221288c88a0cffe2e2',
1648 'info_dict': {
1649 'id': '030273-562_PLUS7-F',
1650 'ext': 'mp4',
1651 'title': 'ARTE Reportage - Nulle part, en France',
1652 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
1653 'upload_date': '20160409',
1654 },
1655 },
1656 # Duplicated embedded video URLs
1657 {
1658 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
1659 'info_dict': {
1660 'id': '149298443_480_16c25b74_2',
1661 'ext': 'mp4',
1662 'title': 'vs. Blue Orange Spring Game',
1663 'uploader': 'www.hudl.com',
1664 },
1665 },
1666 # twitter:player:stream embed
1667 {
1668 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
1669 'info_dict': {
1670 'id': 'master',
1671 'ext': 'mp4',
1672 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
1673 'uploader': 'www.rtl.be',
1674 },
1675 'params': {
1676 # m3u8 downloads
1677 'skip_download': True,
1678 },
1679 },
1680 # twitter:player embed
1681 {
1682 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
1683 'md5': 'a3e0df96369831de324f0778e126653c',
1684 'info_dict': {
1685 'id': '4909620399001',
1686 'ext': 'mp4',
1687 'title': 'What Do Black Holes Sound Like?',
1688 'description': 'what do black holes sound like',
1689 'upload_date': '20160524',
1690 'uploader_id': '29913724001',
1691 'timestamp': 1464107587,
1692 'uploader': 'TheAtlantic',
1693 },
1694 'add_ie': ['BrightcoveLegacy'],
1695 },
1696 # Facebook <iframe> embed
1697 {
1698 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
1699 'md5': 'fbcde74f534176ecb015849146dd3aee',
1700 'info_dict': {
1701 'id': '599637780109885',
1702 'ext': 'mp4',
1703 'title': 'Facebook video #599637780109885',
1704 },
1705 },
1706 # Facebook <iframe> embed, plugin video
1707 {
1708 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
1709 'info_dict': {
1710 'id': '1754168231264132',
1711 'ext': 'mp4',
1712 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
1713 'uploader': 'Tariq Ramadan (official)',
1714 'timestamp': 1496758379,
1715 'upload_date': '20170606',
1716 },
1717 'params': {
1718 'skip_download': True,
1719 },
1720 },
1721 # Facebook API embed
1722 {
1723 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
1724 'md5': 'a47372ee61b39a7b90287094d447d94e',
1725 'info_dict': {
1726 'id': '10153467542406923',
1727 'ext': 'mp4',
1728 'title': 'Facebook video #10153467542406923',
1729 },
1730 },
1731 # Wordpress "YouTube Video Importer" plugin
1732 {
1733 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
1734 'md5': 'd16797741b560b485194eddda8121b48',
1735 'info_dict': {
1736 'id': 'HNTXWDXV9Is',
1737 'ext': 'mp4',
1738 'title': 'Blue Devils Drumline Stanford lot 2016',
1739 'upload_date': '20160627',
1740 'uploader_id': 'GENOCIDE8GENERAL10',
1741 'uploader': 'cylus cyrus',
1742 },
1743 },
1744 {
1745 # video stored on custom kaltura server
1746 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
1747 'md5': '537617d06e64dfed891fa1593c4b30cc',
1748 'info_dict': {
1749 'id': '0_1iotm5bh',
1750 'ext': 'mp4',
1751 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
1752 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
1753 'uploader_id': 'videos.expansion@el-mundo.net',
1754 'upload_date': '20150429',
1755 'timestamp': 1430303472,
1756 },
1757 'add_ie': ['Kaltura'],
1758 },
1759 {
1760 # multiple kaltura embeds, nsfw
1761 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html',
1762 'info_dict': {
1763 'id': 'kamila-avec-video-jaime-sadomie',
1764 'title': "Kamila avec vídeo “J'aime sadomie”",
1765 },
1766 'playlist_count': 8,
1767 },
1768 {
1769 # Non-standard Vimeo embed
1770 'url': 'https://openclassrooms.com/courses/understanding-the-web',
1771 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
1772 'info_dict': {
1773 'id': '148867247',
1774 'ext': 'mp4',
1775 'title': 'Understanding the web - Teaser',
1776 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
1777 'upload_date': '20151214',
1778 'uploader': 'OpenClassrooms',
1779 'uploader_id': 'openclassrooms',
1780 },
1781 'add_ie': ['Vimeo'],
1782 },
1783 {
1784 # generic vimeo embed that requires original URL passed as Referer
1785 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
1786 'only_matching': True,
1787 },
1788 {
1789 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
1790 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
1791 'info_dict': {
1792 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
1793 'ext': 'mp4',
1794 'title': 'Big Buck Bunny',
1795 'description': 'Royalty free test video',
1796 'timestamp': 1432816365,
1797 'upload_date': '20150528',
1798 'is_live': False,
1799 },
1800 'params': {
1801 'skip_download': True,
1802 },
1803 'add_ie': [ArkenaIE.ie_key()],
1804 },
1805 {
1806 '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/',
1807 'info_dict': {
1808 'id': '1c7141f46c',
1809 'ext': 'mp4',
1810 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
1811 },
1812 'params': {
1813 'skip_download': True,
1814 },
1815 'add_ie': [Vbox7IE.ie_key()],
1816 },
1817 {
1818 # DBTV embeds
1819 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
1820 'info_dict': {
1821 'id': '43254897',
1822 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
1823 },
1824 'playlist_mincount': 3,
1825 },
1826 {
1827 # Videa embeds
1828 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
1829 'info_dict': {
1830 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
1831 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
1832 },
1833 'playlist_mincount': 2,
1834 },
1835 {
1836 # 20 minuten embed
1837 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
1838 'info_dict': {
1839 'id': '523629',
1840 'ext': 'mp4',
1841 'title': 'So kommen Sie bei Eis und Schnee sicher an',
1842 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
1843 },
1844 'params': {
1845 'skip_download': True,
1846 },
1847 'add_ie': [TwentyMinutenIE.ie_key()],
1848 },
1849 {
1850 # VideoPress embed
1851 'url': 'https://en.support.wordpress.com/videopress/',
1852 'info_dict': {
1853 'id': 'OcobLTqC',
1854 'ext': 'm4v',
1855 'title': 'IMG_5786',
1856 'timestamp': 1435711927,
1857 'upload_date': '20150701',
1858 },
1859 'params': {
1860 'skip_download': True,
1861 },
1862 'add_ie': [VideoPressIE.ie_key()],
1863 },
1864 {
1865 # Rutube embed
1866 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
1867 'info_dict': {
1868 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
1869 'ext': 'flv',
1870 'title': 'Магаззино: Казань 2',
1871 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
1872 'uploader': 'Магаззино',
1873 'upload_date': '20170228',
1874 'uploader_id': '996642',
1875 },
1876 'params': {
1877 'skip_download': True,
1878 },
1879 'add_ie': [RutubeIE.ie_key()],
1880 },
1881 {
1882 # glomex:embed
1883 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes',
1884 'info_dict': {
1885 'id': 'v-ch2nkhcirwc9-sf',
1886 'ext': 'mp4',
1887 'title': 'md5:786e1e24e06c55993cee965ef853a0c1',
1888 'description': 'md5:8b517a61d577efe7e36fde72fd535995',
1889 'timestamp': 1641885019,
1890 'upload_date': '20220111',
1891 'duration': 460000,
1892 'thumbnail': 'https://i3thumbs.glomex.com/dC1idjJwdndiMjRzeGwvMjAyMi8wMS8xMS8wNy8xMF8zNV82MWRkMmQ2YmU5ZTgyLmpwZw==/profile:player-960x540',
1893 },
1894 },
1895 {
1896 # megatvcom:embed
1897 'url': 'https://www.in.gr/2021/12/18/greece/apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize/',
1898 'info_dict': {
1899 'id': 'apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize',
1900 'title': 'md5:5e569cf996ec111057c2764ec272848f',
1901 },
1902 'playlist': [{
1903 'md5': '1afa26064ff00ccb91617957dbc73dc1',
1904 'info_dict': {
1905 'ext': 'mp4',
1906 'id': '564916',
1907 'display_id': 'md5:6cdf22d3a2e7bacb274b7295089a1770',
1908 'title': 'md5:33b9dd39584685b62873043670eb52a6',
1909 'description': 'md5:c1db7310f390518ac36dd69d947ef1a1',
1910 'timestamp': 1639753145,
1911 'upload_date': '20211217',
1912 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/prezerakos-1024x597.jpg',
1913 },
1914 }, {
1915 'md5': '4a1c220695f1ef865a8b7966a53e2474',
1916 'info_dict': {
1917 'ext': 'mp4',
1918 'id': '564905',
1919 'display_id': 'md5:ead15695e485e649aed2b81ebd699b88',
1920 'title': 'md5:2b71fd54249a3ca34609fe39ae31c47b',
1921 'description': 'md5:c42e12f638d0a97d6de4508e2c4df982',
1922 'timestamp': 1639753047,
1923 'upload_date': '20211217',
1924 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/tsiodras-mitsotakis-1024x545.jpg',
1925 },
1926 }]
1927 },
1928 {
1929 'url': 'https://www.ertnews.gr/video/manolis-goyalles-o-anthropos-piso-apo-ti-diadiktyaki-vasilopita/',
1930 'info_dict': {
1931 'id': '2022/tv/news-themata-ianouarios/20220114-apotis6-gouales-pita.mp4',
1932 'ext': 'mp4',
1933 'title': 'md5:df64f5b61c06d0e9556c0cdd5cf14464',
1934 'thumbnail': 'https://www.ert.gr/themata/photos/2021/20220114-apotis6-gouales-pita.jpg',
1935 },
1936 },
1937 {
1938 # ThePlatform embedded with whitespaces in URLs
1939 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
1940 'only_matching': True,
1941 },
1942 {
1943 # Senate ISVP iframe https
1944 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
1945 'md5': 'fb8c70b0b515e5037981a2492099aab8',
1946 'info_dict': {
1947 'id': 'govtaff020316',
1948 'ext': 'mp4',
1949 'title': 'Integrated Senate Video Player',
1950 },
1951 'add_ie': [SenateISVPIE.ie_key()],
1952 },
1953 {
1954 # Limelight embeds (1 channel embed + 4 media embeds)
1955 'url': 'http://www.sedona.com/FacilitatorTraining2017',
1956 'info_dict': {
1957 'id': 'FacilitatorTraining2017',
1958 'title': 'Facilitator Training 2017',
1959 },
1960 'playlist_mincount': 5,
1961 },
1962 {
1963 # Limelight embed (LimelightPlayerUtil.embed)
1964 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
1965 'info_dict': {
1966 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
1967 'ext': 'mp4',
1968 'title': '07448641',
1969 'timestamp': 1499890639,
1970 'upload_date': '20170712',
1971 },
1972 'params': {
1973 'skip_download': True,
1974 },
1975 'add_ie': ['LimelightMedia'],
1976 },
1977 {
1978 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
1979 'info_dict': {
1980 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
1981 'title': 'Standoff with Walnut Creek murder suspect ends',
1982 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
1983 },
1984 'playlist_mincount': 4,
1985 },
1986 {
1987 # WashingtonPost embed
1988 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
1989 'info_dict': {
1990 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
1991 'ext': 'mp4',
1992 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
1993 '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.',
1994 'timestamp': 1455216756,
1995 'uploader': 'The Washington Post',
1996 'upload_date': '20160211',
1997 },
1998 'add_ie': [WashingtonPostIE.ie_key()],
1999 },
2000 {
2001 # Mediaset embed
2002 'url': 'http://www.tgcom24.mediaset.it/politica/serracchiani-voglio-vivere-in-una-societa-aperta-reazioni-sproporzionate-_3071354-201702a.shtml',
2003 'info_dict': {
2004 'id': '720642',
2005 'ext': 'mp4',
2006 'title': 'Serracchiani: "Voglio vivere in una società aperta, con tutela del patto di fiducia"',
2007 },
2008 'params': {
2009 'skip_download': True,
2010 },
2011 'add_ie': [MediasetIE.ie_key()],
2012 },
2013 {
2014 # JOJ.sk embeds
2015 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
2016 'info_dict': {
2017 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
2018 'title': 'Slovenskom sa prehnala vlna silných búrok',
2019 },
2020 'playlist_mincount': 5,
2021 'add_ie': [JojIE.ie_key()],
2022 },
2023 {
2024 # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
2025 'url': 'https://tvrain.ru/amp/418921/',
2026 'md5': 'cc00413936695987e8de148b67d14f1d',
2027 'info_dict': {
2028 'id': '418921',
2029 'ext': 'mp4',
2030 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
2031 },
2032 },
2033 {
2034 # vzaar embed
2035 'url': 'http://help.vzaar.com/article/165-embedding-video',
2036 'md5': '7e3919d9d2620b89e3e00bec7fe8c9d4',
2037 'info_dict': {
2038 'id': '8707641',
2039 'ext': 'mp4',
2040 'title': 'Building A Business Online: Principal Chairs Q & A',
2041 },
2042 },
2043 {
2044 # multiple HTML5 videos on one page
2045 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
2046 'info_dict': {
2047 'id': 'keyscenarios',
2048 'title': 'Rescue Kit 14 Free Edition - Getting started',
2049 },
2050 'playlist_count': 4,
2051 },
2052 {
2053 # vshare embed
2054 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
2055 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
2056 'info_dict': {
2057 'id': '0f64ce6',
2058 'title': 'vl14062007715967',
2059 'ext': 'mp4',
2060 }
2061 },
2062 {
2063 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
2064 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
2065 'info_dict': {
2066 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
2067 'ext': 'mp4',
2068 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
2069 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
2070 'timestamp': 1474354800,
2071 'upload_date': '20160920',
2072 }
2073 },
2074 {
2075 'url': 'http://www.kidzworld.com/article/30935-trolls-the-beat-goes-on-interview-skylar-astin-and-amanda-leighton',
2076 'info_dict': {
2077 'id': '1731611',
2078 'ext': 'mp4',
2079 'title': 'Official Trailer | TROLLS: THE BEAT GOES ON!',
2080 'description': 'md5:eb5f23826a027ba95277d105f248b825',
2081 'timestamp': 1516100691,
2082 'upload_date': '20180116',
2083 },
2084 'params': {
2085 'skip_download': True,
2086 },
2087 'add_ie': [SpringboardPlatformIE.ie_key()],
2088 },
2089 {
2090 'url': 'https://www.yapfiles.ru/show/1872528/690b05d3054d2dbe1e69523aa21bb3b1.mp4.html',
2091 'info_dict': {
2092 'id': 'vMDE4NzI1Mjgt690b',
2093 'ext': 'mp4',
2094 'title': 'Котята',
2095 },
2096 'add_ie': [YapFilesIE.ie_key()],
2097 'params': {
2098 'skip_download': True,
2099 },
2100 },
2101 {
2102 # CloudflareStream embed
2103 'url': 'https://www.cloudflare.com/products/cloudflare-stream/',
2104 'info_dict': {
2105 'id': '31c9291ab41fac05471db4e73aa11717',
2106 'ext': 'mp4',
2107 'title': '31c9291ab41fac05471db4e73aa11717',
2108 },
2109 'add_ie': [CloudflareStreamIE.ie_key()],
2110 'params': {
2111 'skip_download': True,
2112 },
2113 },
2114 {
2115 # PeerTube embed
2116 'url': 'https://joinpeertube.org/fr/home/',
2117 'info_dict': {
2118 'id': 'home',
2119 'title': 'Reprenez le contrôle de vos vidéos ! #JoinPeertube',
2120 },
2121 'playlist_count': 2,
2122 },
2123 {
2124 # Indavideo embed
2125 'url': 'https://streetkitchen.hu/receptek/igy_kell_otthon_hamburgert_sutni/',
2126 'info_dict': {
2127 'id': '1693903',
2128 'ext': 'mp4',
2129 'title': 'Így kell otthon hamburgert sütni',
2130 'description': 'md5:f5a730ecf900a5c852e1e00540bbb0f7',
2131 'timestamp': 1426330212,
2132 'upload_date': '20150314',
2133 'uploader': 'StreetKitchen',
2134 'uploader_id': '546363',
2135 },
2136 'add_ie': [IndavideoEmbedIE.ie_key()],
2137 'params': {
2138 'skip_download': True,
2139 },
2140 },
2141 {
2142 # APA embed via JWPlatform embed
2143 'url': 'http://www.vol.at/blue-man-group/5593454',
2144 'info_dict': {
2145 'id': 'jjv85FdZ',
2146 'ext': 'mp4',
2147 'title': '"Blau ist mysteriös": Die Blue Man Group im Interview',
2148 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
2149 'thumbnail': r're:^https?://.*\.jpg$',
2150 'duration': 254,
2151 'timestamp': 1519211149,
2152 'upload_date': '20180221',
2153 },
2154 'params': {
2155 'skip_download': True,
2156 },
2157 },
2158 {
2159 'url': 'http://share-videos.se/auto/video/83645793?uid=13',
2160 'md5': 'b68d276de422ab07ee1d49388103f457',
2161 'info_dict': {
2162 'id': '83645793',
2163 'title': 'Lock up and get excited',
2164 'ext': 'mp4'
2165 },
2166 'skip': 'TODO: fix nested playlists processing in tests',
2167 },
2168 {
2169 # Viqeo embeds
2170 'url': 'https://viqeo.tv/',
2171 'info_dict': {
2172 'id': 'viqeo',
2173 'title': 'All-new video platform',
2174 },
2175 'playlist_count': 6,
2176 },
2177 {
2178 # Squarespace video embed, 2019-08-28
2179 'url': 'http://ootboxford.com',
2180 'info_dict': {
2181 'id': 'Tc7b_JGdZfw',
2182 'title': 'Out of the Blue, at Childish Things 10',
2183 'ext': 'mp4',
2184 'description': 'md5:a83d0026666cf5ee970f8bd1cfd69c7f',
2185 'uploader_id': 'helendouglashouse',
2186 'uploader': 'Helen & Douglas House',
2187 'upload_date': '20140328',
2188 },
2189 'params': {
2190 'skip_download': True,
2191 },
2192 },
2193 # {
2194 # # Zype embed
2195 # 'url': 'https://www.cookscountry.com/episode/554-smoky-barbecue-favorites',
2196 # 'info_dict': {
2197 # 'id': '5b400b834b32992a310622b9',
2198 # 'ext': 'mp4',
2199 # 'title': 'Smoky Barbecue Favorites',
2200 # 'thumbnail': r're:^https?://.*\.jpe?g',
2201 # 'description': 'md5:5ff01e76316bd8d46508af26dc86023b',
2202 # 'upload_date': '20170909',
2203 # 'timestamp': 1504915200,
2204 # },
2205 # 'add_ie': [ZypeIE.ie_key()],
2206 # 'params': {
2207 # 'skip_download': True,
2208 # },
2209 # },
2210 {
2211 # videojs embed
2212 'url': 'https://video.sibnet.ru/shell.php?videoid=3422904',
2213 'info_dict': {
2214 'id': 'shell',
2215 'ext': 'mp4',
2216 'title': 'Доставщик пиццы спросил разрешения сыграть на фортепиано',
2217 'description': 'md5:89209cdc587dab1e4a090453dbaa2cb1',
2218 'thumbnail': r're:^https?://.*\.jpg$',
2219 },
2220 'params': {
2221 'skip_download': True,
2222 },
2223 'expected_warnings': ['Failed to download MPD manifest'],
2224 },
2225 {
2226 # DailyMotion embed with DM.player
2227 'url': 'https://www.beinsports.com/us/copa-del-rey/video/the-locker-room-valencia-beat-barca-in-copa/1203804',
2228 'info_dict': {
2229 'id': 'k6aKkGHd9FJs4mtJN39',
2230 'ext': 'mp4',
2231 'title': 'The Locker Room: Valencia Beat Barca In Copa del Rey Final',
2232 'description': 'This video is private.',
2233 'uploader_id': 'x1jf30l',
2234 'uploader': 'beIN SPORTS USA',
2235 'upload_date': '20190528',
2236 'timestamp': 1559062971,
2237 },
2238 'params': {
2239 'skip_download': True,
2240 },
2241 },
2242 {
2243 # tvopengr:embed
2244 'url': 'https://www.ethnos.gr/World/article/190604/hparosiaxekinoynoisynomiliessthgeneyhmethskiatoypolemoypanoapothnoykrania',
2245 'md5': 'eb0c3995d0a6f18f6538c8e057865d7d',
2246 'info_dict': {
2247 'id': '101119',
2248 'ext': 'mp4',
2249 'display_id': 'oikarpoitondiapragmateyseonhparosias',
2250 'title': 'md5:b979f4d640c568617d6547035528a149',
2251 'description': 'md5:e54fc1977c7159b01cc11cd7d9d85550',
2252 'timestamp': 1641772800,
2253 'upload_date': '20220110',
2254 'thumbnail': 'https://opentv-static.siliconweb.com/imgHandler/1920/70bc39fa-895b-4918-a364-c39d2135fc6d.jpg',
2255
2256 }
2257 },
2258 {
2259 # blogger embed
2260 'url': 'https://blog.tomeuvizoso.net/2019/01/a-panfrost-milestone.html',
2261 'md5': 'f1bc19b6ea1b0fd1d81e84ca9ec467ac',
2262 'info_dict': {
2263 'id': 'BLOGGER-video-3c740e3a49197e16-796',
2264 'ext': 'mp4',
2265 'title': 'Blogger',
2266 'thumbnail': r're:^https?://.*',
2267 },
2268 },
2269 # {
2270 # # TODO: find another test
2271 # # http://schema.org/VideoObject
2272 # 'url': 'https://flipagram.com/f/nyvTSJMKId',
2273 # 'md5': '888dcf08b7ea671381f00fab74692755',
2274 # 'info_dict': {
2275 # 'id': 'nyvTSJMKId',
2276 # 'ext': 'mp4',
2277 # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
2278 # 'description': '#love for cats.',
2279 # 'timestamp': 1461244995,
2280 # 'upload_date': '20160421',
2281 # },
2282 # 'params': {
2283 # 'force_generic_extractor': True,
2284 # },
2285 # },
2286 {
2287 # VHX Embed
2288 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
2289 'info_dict': {
2290 'id': '858208',
2291 'ext': 'mp4',
2292 'title': 'Untitled',
2293 'uploader_id': 'user80538407',
2294 'uploader': 'OTT Videos',
2295 },
2296 },
2297 {
2298 # ArcPublishing PoWa video player
2299 'url': 'https://www.adn.com/politics/2020/11/02/video-senate-candidates-campaign-in-anchorage-on-eve-of-election-day/',
2300 'md5': 'b03b2fac8680e1e5a7cc81a5c27e71b3',
2301 'info_dict': {
2302 'id': '8c99cb6e-b29c-4bc9-9173-7bf9979225ab',
2303 'ext': 'mp4',
2304 'title': 'Senate candidates wave to voters on Anchorage streets',
2305 'description': 'md5:91f51a6511f090617353dc720318b20e',
2306 'timestamp': 1604378735,
2307 'upload_date': '20201103',
2308 'duration': 1581,
2309 },
2310 },
2311 {
2312 # MyChannels SDK embed
2313 # https://www.24kitchen.nl/populair/deskundige-dit-waarom-sommigen-gevoelig-zijn-voor-voedselallergieen
2314 'url': 'https://www.demorgen.be/nieuws/burgemeester-rotterdam-richt-zich-in-videoboodschap-tot-relschoppers-voelt-het-goed~b0bcfd741/',
2315 'md5': '90c0699c37006ef18e198c032d81739c',
2316 'info_dict': {
2317 'id': '194165',
2318 'ext': 'mp4',
2319 'title': 'Burgemeester Aboutaleb spreekt relschoppers toe',
2320 'timestamp': 1611740340,
2321 'upload_date': '20210127',
2322 'duration': 159,
2323 },
2324 },
2325 {
2326 # Simplecast player embed
2327 'url': 'https://www.bio.org/podcast',
2328 'info_dict': {
2329 'id': 'podcast',
2330 'title': 'I AM BIO Podcast | BIO',
2331 },
2332 'playlist_mincount': 52,
2333 },
2334 {
2335 # Sibnet embed (https://help.sibnet.ru/?sibnet_video_embed)
2336 'url': 'https://phpbb3.x-tk.ru/bbcode-video-sibnet-t24.html',
2337 'only_matching': True,
2338 }, {
2339 # WimTv embed player
2340 'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
2341 'info_dict': {
2342 'id': 'wearefmi-pt-2-2021',
2343 'title': '#WEAREFMI – PT.2 – 2021 – MsMotorTV',
2344 },
2345 'playlist_count': 1,
2346 }, {
2347 # KVS Player
2348 'url': 'https://www.kvs-demo.com/videos/105/kelis-4th-of-july/',
2349 'info_dict': {
2350 'id': '105',
2351 'display_id': 'kelis-4th-of-july',
2352 'ext': 'mp4',
2353 'title': 'Kelis - 4th Of July',
2354 'thumbnail': 'https://kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
2355 },
2356 'params': {
2357 'skip_download': True,
2358 },
2359 }, {
2360 # KVS Player
2361 'url': 'https://www.kvs-demo.com/embed/105/',
2362 'info_dict': {
2363 'id': '105',
2364 'display_id': 'kelis-4th-of-july',
2365 'ext': 'mp4',
2366 'title': 'Kelis - 4th Of July / Embed Player',
2367 'thumbnail': 'https://kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
2368 },
2369 'params': {
2370 'skip_download': True,
2371 },
2372 }, {
2373 # KVS Player
2374 'url': 'https://thisvid.com/videos/french-boy-pantsed/',
2375 'md5': '3397979512c682f6b85b3b04989df224',
2376 'info_dict': {
2377 'id': '2400174',
2378 'display_id': 'french-boy-pantsed',
2379 'ext': 'mp4',
2380 'title': 'French Boy Pantsed - ThisVid.com',
2381 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2400000/2400174/preview.mp4.jpg',
2382 }
2383 }, {
2384 # KVS Player
2385 'url': 'https://thisvid.com/embed/2400174/',
2386 'md5': '3397979512c682f6b85b3b04989df224',
2387 'info_dict': {
2388 'id': '2400174',
2389 'display_id': 'french-boy-pantsed',
2390 'ext': 'mp4',
2391 'title': 'French Boy Pantsed - ThisVid.com',
2392 'thumbnail': 'https://media.thisvid.com/contents/videos_screenshots/2400000/2400174/preview.mp4.jpg',
2393 }
2394 }, {
2395 # KVS Player
2396 'url': 'https://youix.com/video/leningrad-zoj/',
2397 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
2398 'info_dict': {
2399 'id': '18485',
2400 'display_id': 'leningrad-zoj',
2401 'ext': 'mp4',
2402 'title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',
2403 'thumbnail': 'https://youix.com/contents/videos_screenshots/18000/18485/preview_480x320_youix_com.mp4.jpg',
2404 }
2405 }, {
2406 # KVS Player
2407 'url': 'https://youix.com/embed/18485',
2408 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
2409 'info_dict': {
2410 'id': '18485',
2411 'display_id': 'leningrad-zoj',
2412 'ext': 'mp4',
2413 'title': 'Ленинград - ЗОЖ',
2414 'thumbnail': 'https://youix.com/contents/videos_screenshots/18000/18485/preview_480x320_youix_com.mp4.jpg',
2415 }
2416 }, {
2417 # KVS Player
2418 'url': 'https://bogmedia.org/videos/21217/40-nochey-40-nights-2016/',
2419 'md5': '94166bdb26b4cb1fb9214319a629fc51',
2420 'info_dict': {
2421 'id': '21217',
2422 'display_id': '40-nochey-40-nights-2016',
2423 'ext': 'mp4',
2424 'title': '40 ночей (2016) - BogMedia.org',
2425 'thumbnail': 'https://bogmedia.org/contents/videos_screenshots/21000/21217/preview_480p.mp4.jpg',
2426 }
2427 },
2428 {
2429 # KVS Player (for sites that serve kt_player.js via non-https urls)
2430 'url': 'http://www.camhub.world/embed/389508',
2431 'md5': 'fbe89af4cfb59c8fd9f34a202bb03e32',
2432 'info_dict': {
2433 'id': '389508',
2434 'display_id': 'syren-de-mer-onlyfans-05-07-2020have-a-happy-safe-holiday5f014e68a220979bdb8cd-source',
2435 'ext': 'mp4',
2436 'title': 'Syren De Mer onlyfans_05-07-2020Have_a_happy_safe_holiday5f014e68a220979bdb8cd_source / Embed плеер',
2437 'thumbnail': 'http://www.camhub.world/contents/videos_screenshots/389000/389508/preview.mp4.jpg',
2438 }
2439 },
2440 {
2441 # Reddit-hosted video that will redirect and be processed by RedditIE
2442 # Redirects to https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
2443 'url': 'https://v.redd.it/zv89llsvexdz',
2444 'md5': '87f5f02f6c1582654146f830f21f8662',
2445 'info_dict': {
2446 'id': 'zv89llsvexdz',
2447 'ext': 'mp4',
2448 'timestamp': 1501941939.0,
2449 'title': 'That small heart attack.',
2450 'upload_date': '20170805',
2451 'uploader': 'Antw87'
2452 }
2453 },
2454 {
2455 # 1080p Reddit-hosted video that will redirect and be processed by RedditIE
2456 'url': 'https://v.redd.it/33hgok7dfbz71/',
2457 'md5': '7a1d587940242c9bb3bd6eb320b39258',
2458 'info_dict': {
2459 'id': '33hgok7dfbz71',
2460 'ext': 'mp4',
2461 'title': "The game Didn't want me to Knife that Guy I guess",
2462 'uploader': 'paraf1ve',
2463 'timestamp': 1636788683.0,
2464 'upload_date': '20211113'
2465 }
2466 },
2467 {
2468 # MainStreaming player
2469 'url': 'https://www.lactv.it/2021/10/03/lac-news24-la-settimana-03-10-2021/',
2470 'info_dict': {
2471 'id': 'EUlZfGWkGpOd',
2472 'title': 'La Settimana ',
2473 'description': '03 Ottobre ore 02:00',
2474 'ext': 'mp4',
2475 'live_status': 'not_live',
2476 'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster',
2477 'duration': 1512
2478 }
2479 },
2480 {
2481 # Multiple gfycat iframe embeds
2482 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
2483 'info_dict': {
2484 'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
2485 'id': 'board'
2486 },
2487 'playlist_count': 8,
2488 },
2489 {
2490 # Multiple gfycat gifs (direct links)
2491 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
2492 'info_dict': {
2493 'title': '옳게 된 크롭 니트 스테이씨 아이사',
2494 'id': 'board'
2495 },
2496 'playlist_count': 6
2497 },
2498 {
2499 # Multiple gfycat embeds, with uppercase "IFR" in urls
2500 'url': 'https://kkzz.kr/?vid=2295',
2501 'info_dict': {
2502 'title': '지방시 앰버서더 에스파 카리나 움짤',
2503 'id': '?vid=2295'
2504 },
2505 'playlist_count': 9
2506 },
2507 {
2508 # Panopto embeds
2509 'url': 'https://www.monash.edu/learning-teaching/teachhq/learning-technologies/panopto/how-to/insert-a-quiz-into-a-panopto-video',
2510 'info_dict': {
2511 'title': 'Insert a quiz into a Panopto video',
2512 'id': 'insert-a-quiz-into-a-panopto-video'
2513 },
2514 'playlist_count': 1
2515 },
2516 {
2517 # Ruutu embed
2518 'url': 'https://www.nelonen.fi/ohjelmat/madventures-suomi/2160731-riku-ja-tunna-lahtevat-peurajahtiin-tv-sta-tutun-biologin-kanssa---metsastysreissu-huipentuu-kasvissyojan-painajaiseen',
2519 'md5': 'a2513a98d3496099e6eced40f7e6a14b',
2520 'info_dict': {
2521 'id': '4044426',
2522 'ext': 'mp4',
2523 'title': 'Riku ja Tunna lähtevät peurajahtiin tv:stä tutun biologin kanssa – metsästysreissu huipentuu kasvissyöjän painajaiseen!',
2524 'thumbnail': r're:^https?://.+\.jpg$',
2525 'duration': 108,
2526 'series': 'Madventures Suomi',
2527 'description': 'md5:aa55b44bd06a1e337a6f1d0b46507381',
2528 'categories': ['Matkailu', 'Elämäntyyli'],
2529 'age_limit': 0,
2530 'upload_date': '20220308',
2531 },
2532 },
2533 ]
2534
2535 def report_following_redirect(self, new_url):
2536 """Report information extraction."""
2537 self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
2538
2539 def report_detected(self, name):
2540 self._downloader.write_debug(f'Identified a {name}')
2541
2542 def _extract_rss(self, url, video_id, doc):
2543 playlist_title = doc.find('./channel/title').text
2544 playlist_desc_el = doc.find('./channel/description')
2545 playlist_desc = None if playlist_desc_el is None else playlist_desc_el.text
2546
2547 NS_MAP = {
2548 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
2549 }
2550
2551 entries = []
2552 for it in doc.findall('./channel/item'):
2553 next_url = None
2554 enclosure_nodes = it.findall('./enclosure')
2555 for e in enclosure_nodes:
2556 next_url = e.attrib.get('url')
2557 if next_url:
2558 break
2559
2560 if not next_url:
2561 next_url = xpath_text(it, 'link', fatal=False)
2562
2563 if not next_url:
2564 continue
2565
2566 if it.find('guid').text is not None:
2567 next_url = smuggle_url(next_url, {'force_videoid': it.find('guid').text})
2568
2569 def itunes(key):
2570 return xpath_text(
2571 it, xpath_with_ns('./itunes:%s' % key, NS_MAP),
2572 default=None)
2573
2574 duration = itunes('duration')
2575 explicit = (itunes('explicit') or '').lower()
2576 if explicit in ('true', 'yes'):
2577 age_limit = 18
2578 elif explicit in ('false', 'no'):
2579 age_limit = 0
2580 else:
2581 age_limit = None
2582
2583 entries.append({
2584 '_type': 'url_transparent',
2585 'url': next_url,
2586 'title': it.find('title').text,
2587 'description': xpath_text(it, 'description', default=None),
2588 'timestamp': unified_timestamp(
2589 xpath_text(it, 'pubDate', default=None)),
2590 'duration': int_or_none(duration) or parse_duration(duration),
2591 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
2592 'episode': itunes('title'),
2593 'episode_number': int_or_none(itunes('episode')),
2594 'season_number': int_or_none(itunes('season')),
2595 'age_limit': age_limit,
2596 })
2597
2598 return {
2599 '_type': 'playlist',
2600 'id': url,
2601 'title': playlist_title,
2602 'description': playlist_desc,
2603 'entries': entries,
2604 }
2605
2606 def _extract_camtasia(self, url, video_id, webpage):
2607 """ Returns None if no camtasia video can be found. """
2608
2609 camtasia_cfg = self._search_regex(
2610 r'fo\.addVariable\(\s*"csConfigFile",\s*"([^"]+)"\s*\);',
2611 webpage, 'camtasia configuration file', default=None)
2612 if camtasia_cfg is None:
2613 return None
2614
2615 title = self._html_search_meta('DC.title', webpage, fatal=True)
2616
2617 camtasia_url = compat_urlparse.urljoin(url, camtasia_cfg)
2618 camtasia_cfg = self._download_xml(
2619 camtasia_url, video_id,
2620 note='Downloading camtasia configuration',
2621 errnote='Failed to download camtasia configuration')
2622 fileset_node = camtasia_cfg.find('./playlist/array/fileset')
2623
2624 entries = []
2625 for n in fileset_node.getchildren():
2626 url_n = n.find('./uri')
2627 if url_n is None:
2628 continue
2629
2630 entries.append({
2631 'id': os.path.splitext(url_n.text.rpartition('/')[2])[0],
2632 'title': '%s - %s' % (title, n.tag),
2633 'url': compat_urlparse.urljoin(url, url_n.text),
2634 'duration': float_or_none(n.find('./duration').text),
2635 })
2636
2637 return {
2638 '_type': 'playlist',
2639 'entries': entries,
2640 'title': title,
2641 }
2642
2643 def _kvs_getrealurl(self, video_url, license_code):
2644 if not video_url.startswith('function/0/'):
2645 return video_url # not obfuscated
2646
2647 url_path, _, url_query = video_url.partition('?')
2648 urlparts = url_path.split('/')[2:]
2649 license = self._kvs_getlicensetoken(license_code)
2650 newmagic = urlparts[5][:32]
2651
2652 for o in range(len(newmagic) - 1, -1, -1):
2653 new = ''
2654 l = (o + sum([int(n) for n in license[o:]])) % 32
2655
2656 for i in range(0, len(newmagic)):
2657 if i == o:
2658 new += newmagic[l]
2659 elif i == l:
2660 new += newmagic[o]
2661 else:
2662 new += newmagic[i]
2663 newmagic = new
2664
2665 urlparts[5] = newmagic + urlparts[5][32:]
2666 return '/'.join(urlparts) + '?' + url_query
2667
2668 def _kvs_getlicensetoken(self, license):
2669 modlicense = license.replace('$', '').replace('0', '1')
2670 center = int(len(modlicense) / 2)
2671 fronthalf = int(modlicense[:center + 1])
2672 backhalf = int(modlicense[center:])
2673
2674 modlicense = str(4 * abs(fronthalf - backhalf))
2675 retval = ''
2676 for o in range(0, center + 1):
2677 for i in range(1, 5):
2678 retval += str((int(license[o + i]) + int(modlicense[o])) % 10)
2679 return retval
2680
2681 def _real_extract(self, url):
2682 if url.startswith('//'):
2683 return self.url_result(self.http_scheme() + url)
2684
2685 parsed_url = compat_urlparse.urlparse(url)
2686 if not parsed_url.scheme:
2687 default_search = self.get_param('default_search')
2688 if default_search is None:
2689 default_search = 'fixup_error'
2690
2691 if default_search in ('auto', 'auto_warning', 'fixup_error'):
2692 if re.match(r'^[^\s/]+\.[^\s/]+/', url):
2693 self.report_warning('The url doesn\'t specify the protocol, trying with http')
2694 return self.url_result('http://' + url)
2695 elif default_search != 'fixup_error':
2696 if default_search == 'auto_warning':
2697 if re.match(r'^(?:url|URL)$', url):
2698 raise ExtractorError(
2699 'Invalid URL: %r . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url,
2700 expected=True)
2701 else:
2702 self.report_warning(
2703 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
2704 return self.url_result('ytsearch:' + url)
2705
2706 if default_search in ('error', 'fixup_error'):
2707 raise ExtractorError(
2708 '%r is not a valid URL. '
2709 'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%s" ) to search YouTube'
2710 % (url, url), expected=True)
2711 else:
2712 if ':' not in default_search:
2713 default_search += ':'
2714 return self.url_result(default_search + url)
2715
2716 url, smuggled_data = unsmuggle_url(url)
2717 force_videoid = None
2718 is_intentional = smuggled_data and smuggled_data.get('to_generic')
2719 if smuggled_data and 'force_videoid' in smuggled_data:
2720 force_videoid = smuggled_data['force_videoid']
2721 video_id = force_videoid
2722 else:
2723 video_id = self._generic_id(url)
2724
2725 self.to_screen('%s: Requesting header' % video_id)
2726
2727 head_req = HEADRequest(url)
2728 head_response = self._request_webpage(
2729 head_req, video_id,
2730 note=False, errnote='Could not send HEAD request to %s' % url,
2731 fatal=False)
2732
2733 if head_response is not False:
2734 # Check for redirect
2735 new_url = head_response.geturl()
2736 if url != new_url:
2737 self.report_following_redirect(new_url)
2738 if force_videoid:
2739 new_url = smuggle_url(
2740 new_url, {'force_videoid': force_videoid})
2741 return self.url_result(new_url)
2742
2743 full_response = None
2744 if head_response is False:
2745 request = sanitized_Request(url)
2746 request.add_header('Accept-Encoding', '*')
2747 full_response = self._request_webpage(request, video_id)
2748 head_response = full_response
2749
2750 info_dict = {
2751 'id': video_id,
2752 'title': self._generic_title(url),
2753 'timestamp': unified_timestamp(head_response.headers.get('Last-Modified'))
2754 }
2755
2756 # Check for direct link to a video
2757 content_type = head_response.headers.get('Content-Type', '').lower()
2758 m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
2759 if m:
2760 self.report_detected('direct video link')
2761 format_id = compat_str(m.group('format_id'))
2762 subtitles = {}
2763 if format_id.endswith('mpegurl'):
2764 formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
2765 elif format_id.endswith('mpd') or format_id.endswith('dash+xml'):
2766 formats, subtitles = self._extract_mpd_formats_and_subtitles(url, video_id)
2767 elif format_id == 'f4m':
2768 formats = self._extract_f4m_formats(url, video_id)
2769 else:
2770 formats = [{
2771 'format_id': format_id,
2772 'url': url,
2773 'vcodec': 'none' if m.group('type') == 'audio' else None
2774 }]
2775 info_dict['direct'] = True
2776 self._sort_formats(formats)
2777 info_dict['formats'] = formats
2778 info_dict['subtitles'] = subtitles
2779 return info_dict
2780
2781 if not self.get_param('test', False) and not is_intentional:
2782 force = self.get_param('force_generic_extractor', False)
2783 self.report_warning(
2784 '%s on generic information extractor.' % ('Forcing' if force else 'Falling back'))
2785
2786 if not full_response:
2787 request = sanitized_Request(url)
2788 # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
2789 # making it impossible to download only chunk of the file (yet we need only 512kB to
2790 # test whether it's HTML or not). According to yt-dlp default Accept-Encoding
2791 # that will always result in downloading the whole file that is not desirable.
2792 # Therefore for extraction pass we have to override Accept-Encoding to any in order
2793 # to accept raw bytes and being able to download only a chunk.
2794 # It may probably better to solve this by checking Content-Type for application/octet-stream
2795 # after HEAD request finishes, but not sure if we can rely on this.
2796 request.add_header('Accept-Encoding', '*')
2797 full_response = self._request_webpage(request, video_id)
2798
2799 first_bytes = full_response.read(512)
2800
2801 # Is it an M3U playlist?
2802 if first_bytes.startswith(b'#EXTM3U'):
2803 self.report_detected('M3U playlist')
2804 info_dict['formats'], info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
2805 self._sort_formats(info_dict['formats'])
2806 return info_dict
2807
2808 # Maybe it's a direct link to a video?
2809 # Be careful not to download the whole thing!
2810 if not is_html(first_bytes):
2811 self.report_warning(
2812 'URL could be a direct video link, returning it as such.')
2813 info_dict.update({
2814 'direct': True,
2815 'url': url,
2816 })
2817 return info_dict
2818
2819 webpage = self._webpage_read_content(
2820 full_response, url, video_id, prefix=first_bytes)
2821
2822 if '<title>DPG Media Privacy Gate</title>' in webpage:
2823 webpage = self._download_webpage(url, video_id)
2824
2825 self.report_extraction(video_id)
2826
2827 # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
2828 try:
2829 try:
2830 doc = compat_etree_fromstring(webpage)
2831 except compat_xml_parse_error:
2832 doc = compat_etree_fromstring(webpage.encode('utf-8'))
2833 if doc.tag == 'rss':
2834 self.report_detected('RSS feed')
2835 return self._extract_rss(url, video_id, doc)
2836 elif doc.tag == 'SmoothStreamingMedia':
2837 info_dict['formats'], info_dict['subtitles'] = self._parse_ism_formats_and_subtitles(doc, url)
2838 self.report_detected('ISM manifest')
2839 self._sort_formats(info_dict['formats'])
2840 return info_dict
2841 elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
2842 smil = self._parse_smil(doc, url, video_id)
2843 self.report_detected('SMIL file')
2844 self._sort_formats(smil['formats'])
2845 return smil
2846 elif doc.tag == '{http://xspf.org/ns/0/}playlist':
2847 self.report_detected('XSPF playlist')
2848 return self.playlist_result(
2849 self._parse_xspf(
2850 doc, video_id, xspf_url=url,
2851 xspf_base_url=full_response.geturl()),
2852 video_id)
2853 elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
2854 info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles(
2855 doc,
2856 mpd_base_url=full_response.geturl().rpartition('/')[0],
2857 mpd_url=url)
2858 self.report_detected('DASH manifest')
2859 self._sort_formats(info_dict['formats'])
2860 return info_dict
2861 elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
2862 info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
2863 self.report_detected('F4M manifest')
2864 self._sort_formats(info_dict['formats'])
2865 return info_dict
2866 except compat_xml_parse_error:
2867 pass
2868
2869 # Is it a Camtasia project?
2870 camtasia_res = self._extract_camtasia(url, video_id, webpage)
2871 if camtasia_res is not None:
2872 self.report_detected('Camtasia video')
2873 return camtasia_res
2874
2875 # Sometimes embedded video player is hidden behind percent encoding
2876 # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448)
2877 # Unescaping the whole page allows to handle those cases in a generic way
2878 # FIXME: unescaping the whole page may break URLs, commenting out for now.
2879 # There probably should be a second run of generic extractor on unescaped webpage.
2880 # webpage = compat_urllib_parse_unquote(webpage)
2881
2882 # Unescape squarespace embeds to be detected by generic extractor,
2883 # see https://github.com/ytdl-org/youtube-dl/issues/21294
2884 webpage = re.sub(
2885 r'<div[^>]+class=[^>]*?\bsqs-video-wrapper\b[^>]*>',
2886 lambda x: unescapeHTML(x.group(0)), webpage)
2887
2888 # it's tempting to parse this further, but you would
2889 # have to take into account all the variations like
2890 # Video Title - Site Name
2891 # Site Name | Video Title
2892 # Video Title - Tagline | Site Name
2893 # and so on and so forth; it's just not practical
2894 video_title = (self._og_search_title(webpage, default=None)
2895 or self._html_extract_title(webpage, 'video title', default='video'))
2896
2897 # Try to detect age limit automatically
2898 age_limit = self._rta_search(webpage)
2899 # And then there are the jokers who advertise that they use RTA,
2900 # but actually don't.
2901 AGE_LIMIT_MARKERS = [
2902 r'Proudly Labeled <a href="http://www\.rtalabel\.org/" title="Restricted to Adults">RTA</a>',
2903 ]
2904 if any(re.search(marker, webpage) for marker in AGE_LIMIT_MARKERS):
2905 age_limit = 18
2906
2907 # video uploader is domain name
2908 video_uploader = self._search_regex(
2909 r'^(?:https?://)?([^/]*)/.*', url, 'video uploader')
2910
2911 video_description = self._og_search_description(webpage, default=None)
2912 video_thumbnail = self._og_search_thumbnail(webpage, default=None)
2913
2914 info_dict.update({
2915 'title': video_title,
2916 'description': video_description,
2917 'thumbnail': video_thumbnail,
2918 'age_limit': age_limit,
2919 })
2920
2921 self._downloader.write_debug('Looking for video embeds')
2922
2923 # Look for Brightcove Legacy Studio embeds
2924 bc_urls = BrightcoveLegacyIE._extract_brightcove_urls(webpage)
2925 if bc_urls:
2926 entries = [{
2927 '_type': 'url',
2928 'url': smuggle_url(bc_url, {'Referer': url}),
2929 'ie_key': 'BrightcoveLegacy'
2930 } for bc_url in bc_urls]
2931
2932 return {
2933 '_type': 'playlist',
2934 'title': video_title,
2935 'id': video_id,
2936 'entries': entries,
2937 }
2938
2939 # Look for Brightcove New Studio embeds
2940 bc_urls = BrightcoveNewIE._extract_urls(self, webpage)
2941 if bc_urls:
2942 return self.playlist_from_matches(
2943 bc_urls, video_id, video_title,
2944 getter=lambda x: smuggle_url(x, {'referrer': url}),
2945 ie='BrightcoveNew')
2946
2947 # Look for Nexx embeds
2948 nexx_urls = NexxIE._extract_urls(webpage)
2949 if nexx_urls:
2950 return self.playlist_from_matches(nexx_urls, video_id, video_title, ie=NexxIE.ie_key())
2951
2952 # Look for Nexx iFrame embeds
2953 nexx_embed_urls = NexxEmbedIE._extract_urls(webpage)
2954 if nexx_embed_urls:
2955 return self.playlist_from_matches(nexx_embed_urls, video_id, video_title, ie=NexxEmbedIE.ie_key())
2956
2957 # Look for ThePlatform embeds
2958 tp_urls = ThePlatformIE._extract_urls(webpage)
2959 if tp_urls:
2960 return self.playlist_from_matches(tp_urls, video_id, video_title, ie='ThePlatform')
2961
2962 arc_urls = ArcPublishingIE._extract_urls(webpage)
2963 if arc_urls:
2964 return self.playlist_from_matches(arc_urls, video_id, video_title, ie=ArcPublishingIE.ie_key())
2965
2966 mychannels_urls = MedialaanIE._extract_urls(webpage)
2967 if mychannels_urls:
2968 return self.playlist_from_matches(
2969 mychannels_urls, video_id, video_title, ie=MedialaanIE.ie_key())
2970
2971 # Look for embedded rtl.nl player
2972 matches = re.findall(
2973 r'<iframe[^>]+?src="((?:https?:)?//(?:(?:www|static)\.)?rtl\.nl/(?:system/videoplayer/[^"]+(?:video_)?)?embed[^"]+)"',
2974 webpage)
2975 if matches:
2976 return self.playlist_from_matches(matches, video_id, video_title, ie='RtlNl')
2977
2978 vimeo_urls = VimeoIE._extract_urls(url, webpage)
2979 if vimeo_urls:
2980 return self.playlist_from_matches(vimeo_urls, video_id, video_title, ie=VimeoIE.ie_key())
2981
2982 vhx_url = VHXEmbedIE._extract_url(webpage)
2983 if vhx_url:
2984 return self.url_result(vhx_url, VHXEmbedIE.ie_key())
2985
2986 # Invidious Instances
2987 # https://github.com/yt-dlp/yt-dlp/issues/195
2988 # https://github.com/iv-org/invidious/pull/1730
2989 youtube_url = self._search_regex(
2990 r'<link rel="alternate" href="(https://www\.youtube\.com/watch\?v=[0-9A-Za-z_-]{11})"',
2991 webpage, 'youtube link', default=None)
2992 if youtube_url:
2993 return self.url_result(youtube_url, YoutubeIE.ie_key())
2994
2995 # Look for YouTube embeds
2996 youtube_urls = YoutubeIE._extract_urls(webpage)
2997 if youtube_urls:
2998 return self.playlist_from_matches(
2999 youtube_urls, video_id, video_title, ie=YoutubeIE.ie_key())
3000
3001 matches = DailymotionIE._extract_urls(webpage)
3002 if matches:
3003 return self.playlist_from_matches(matches, video_id, video_title)
3004
3005 # Look for embedded Dailymotion playlist player (#3822)
3006 m = re.search(
3007 r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.[a-z]{2,3}/widget/jukebox\?.+?)\1', webpage)
3008 if m:
3009 playlists = re.findall(
3010 r'list\[\]=/playlist/([^/]+)/', unescapeHTML(m.group('url')))
3011 if playlists:
3012 return self.playlist_from_matches(
3013 playlists, video_id, video_title, lambda p: '//dailymotion.com/playlist/%s' % p)
3014
3015 # Look for DailyMail embeds
3016 dailymail_urls = DailyMailIE._extract_urls(webpage)
3017 if dailymail_urls:
3018 return self.playlist_from_matches(
3019 dailymail_urls, video_id, video_title, ie=DailyMailIE.ie_key())
3020
3021 # Look for Teachable embeds, must be before Wistia
3022 teachable_url = TeachableIE._extract_url(webpage, url)
3023 if teachable_url:
3024 return self.url_result(teachable_url)
3025
3026 # Look for embedded Wistia player
3027 wistia_urls = WistiaIE._extract_urls(webpage)
3028 if wistia_urls:
3029 playlist = self.playlist_from_matches(wistia_urls, video_id, video_title, ie=WistiaIE.ie_key())
3030 for entry in playlist['entries']:
3031 entry.update({
3032 '_type': 'url_transparent',
3033 'uploader': video_uploader,
3034 })
3035 return playlist
3036
3037 # Look for SVT player
3038 svt_url = SVTIE._extract_url(webpage)
3039 if svt_url:
3040 return self.url_result(svt_url, 'SVT')
3041
3042 # Look for Bandcamp pages with custom domain
3043 mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
3044 if mobj is not None:
3045 burl = unescapeHTML(mobj.group(1))
3046 # Don't set the extractor because it can be a track url or an album
3047 return self.url_result(burl)
3048
3049 # Look for embedded Vevo player
3050 mobj = re.search(
3051 r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:cache\.)?vevo\.com/.+?)\1', webpage)
3052 if mobj is not None:
3053 return self.url_result(mobj.group('url'))
3054
3055 # Look for embedded Viddler player
3056 mobj = re.search(
3057 r'<(?:iframe[^>]+?src|param[^>]+?value)=(["\'])(?P<url>(?:https?:)?//(?:www\.)?viddler\.com/(?:embed|player)/.+?)\1',
3058 webpage)
3059 if mobj is not None:
3060 return self.url_result(mobj.group('url'))
3061
3062 # Look for NYTimes player
3063 mobj = re.search(
3064 r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//graphics8\.nytimes\.com/bcvideo/[^/]+/iframe/embed\.html.+?)\1>',
3065 webpage)
3066 if mobj is not None:
3067 return self.url_result(mobj.group('url'))
3068
3069 # Look for Libsyn player
3070 mobj = re.search(
3071 r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//html5-player\.libsyn\.com/embed/.+?)\1', webpage)
3072 if mobj is not None:
3073 return self.url_result(mobj.group('url'))
3074
3075 # Look for Ooyala videos
3076 mobj = (re.search(r'player\.ooyala\.com/[^"?]+[?#][^"]*?(?:embedCode|ec)=(?P<ec>[^"&]+)', webpage)
3077 or re.search(r'OO\.Player\.create\([\'"].*?[\'"],\s*[\'"](?P<ec>.{32})[\'"]', webpage)
3078 or re.search(r'OO\.Player\.create\.apply\(\s*OO\.Player\s*,\s*op\(\s*\[\s*[\'"][^\'"]*[\'"]\s*,\s*[\'"](?P<ec>.{32})[\'"]', webpage)
3079 or re.search(r'SBN\.VideoLinkset\.ooyala\([\'"](?P<ec>.{32})[\'"]\)', webpage)
3080 or re.search(r'data-ooyala-video-id\s*=\s*[\'"](?P<ec>.{32})[\'"]', webpage))
3081 if mobj is not None:
3082 embed_token = self._search_regex(
3083 r'embedToken[\'"]?\s*:\s*[\'"]([^\'"]+)',
3084 webpage, 'ooyala embed token', default=None)
3085 return OoyalaIE._build_url_result(smuggle_url(
3086 mobj.group('ec'), {
3087 'domain': url,
3088 'embed_token': embed_token,
3089 }))
3090
3091 # Look for multiple Ooyala embeds on SBN network websites
3092 mobj = re.search(r'SBN\.VideoLinkset\.entryGroup\((\[.*?\])', webpage)
3093 if mobj is not None:
3094 embeds = self._parse_json(mobj.group(1), video_id, fatal=False)
3095 if embeds:
3096 return self.playlist_from_matches(
3097 embeds, video_id, video_title,
3098 getter=lambda v: OoyalaIE._url_for_embed_code(smuggle_url(v['provider_video_id'], {'domain': url})), ie='Ooyala')
3099
3100 # Look for Aparat videos
3101 mobj = re.search(r'<iframe .*?src="(http://www\.aparat\.com/video/[^"]+)"', webpage)
3102 if mobj is not None:
3103 return self.url_result(mobj.group(1), 'Aparat')
3104
3105 # Look for MPORA videos
3106 mobj = re.search(r'<iframe .*?src="(http://mpora\.(?:com|de)/videos/[^"]+)"', webpage)
3107 if mobj is not None:
3108 return self.url_result(mobj.group(1), 'Mpora')
3109
3110 # Look for embedded Facebook player
3111 facebook_urls = FacebookIE._extract_urls(webpage)
3112 if facebook_urls:
3113 return self.playlist_from_matches(facebook_urls, video_id, video_title)
3114
3115 # Look for embedded VK player
3116 mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk\.com/video_ext\.php.+?)\1', webpage)
3117 if mobj is not None:
3118 return self.url_result(mobj.group('url'), 'VK')
3119
3120 # Look for embedded Odnoklassniki player
3121 odnoklassniki_url = OdnoklassnikiIE._extract_url(webpage)
3122 if odnoklassniki_url:
3123 return self.url_result(odnoklassniki_url, OdnoklassnikiIE.ie_key())
3124
3125 # Look for sibnet embedded player
3126 sibnet_urls = VKIE._extract_sibnet_urls(webpage)
3127 if sibnet_urls:
3128 return self.playlist_from_matches(sibnet_urls, video_id, video_title)
3129
3130 # Look for embedded ivi player
3131 mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
3132 if mobj is not None:
3133 return self.url_result(mobj.group('url'), 'Ivi')
3134
3135 # Look for embedded Huffington Post player
3136 mobj = re.search(
3137 r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)
3138 if mobj is not None:
3139 return self.url_result(mobj.group('url'), 'HuffPost')
3140
3141 # Look for embed.ly
3142 mobj = re.search(r'class=["\']embedly-card["\'][^>]href=["\'](?P<url>[^"\']+)', webpage)
3143 if mobj is not None:
3144 return self.url_result(mobj.group('url'))
3145 mobj = re.search(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', webpage)
3146 if mobj is not None:
3147 return self.url_result(compat_urllib_parse_unquote(mobj.group('url')))
3148
3149 # Look for funnyordie embed
3150 matches = re.findall(r'<iframe[^>]+?src="(https?://(?:www\.)?funnyordie\.com/embed/[^"]+)"', webpage)
3151 if matches:
3152 return self.playlist_from_matches(
3153 matches, video_id, video_title, getter=unescapeHTML, ie='FunnyOrDie')
3154
3155 # Look for Simplecast embeds
3156 simplecast_urls = SimplecastIE._extract_urls(webpage)
3157 if simplecast_urls:
3158 return self.playlist_from_matches(
3159 simplecast_urls, video_id, video_title)
3160
3161 # Look for BBC iPlayer embed
3162 matches = re.findall(r'setPlaylist\("(https?://www\.bbc\.co\.uk/iplayer/[^/]+/[\da-z]{8})"\)', webpage)
3163 if matches:
3164 return self.playlist_from_matches(matches, video_id, video_title, ie='BBCCoUk')
3165
3166 # Look for embedded RUTV player
3167 rutv_url = RUTVIE._extract_url(webpage)
3168 if rutv_url:
3169 return self.url_result(rutv_url, 'RUTV')
3170
3171 # Look for embedded TVC player
3172 tvc_url = TVCIE._extract_url(webpage)
3173 if tvc_url:
3174 return self.url_result(tvc_url, 'TVC')
3175
3176 # Look for embedded SportBox player
3177 sportbox_urls = SportBoxIE._extract_urls(webpage)
3178 if sportbox_urls:
3179 return self.playlist_from_matches(sportbox_urls, video_id, video_title, ie=SportBoxIE.ie_key())
3180
3181 # Look for embedded XHamster player
3182 xhamster_urls = XHamsterEmbedIE._extract_urls(webpage)
3183 if xhamster_urls:
3184 return self.playlist_from_matches(xhamster_urls, video_id, video_title, ie='XHamsterEmbed')
3185
3186 # Look for embedded TNAFlixNetwork player
3187 tnaflix_urls = TNAFlixNetworkEmbedIE._extract_urls(webpage)
3188 if tnaflix_urls:
3189 return self.playlist_from_matches(tnaflix_urls, video_id, video_title, ie=TNAFlixNetworkEmbedIE.ie_key())
3190
3191 # Look for embedded PornHub player
3192 pornhub_urls = PornHubIE._extract_urls(webpage)
3193 if pornhub_urls:
3194 return self.playlist_from_matches(pornhub_urls, video_id, video_title, ie=PornHubIE.ie_key())
3195
3196 # Look for embedded DrTuber player
3197 drtuber_urls = DrTuberIE._extract_urls(webpage)
3198 if drtuber_urls:
3199 return self.playlist_from_matches(drtuber_urls, video_id, video_title, ie=DrTuberIE.ie_key())
3200
3201 # Look for embedded RedTube player
3202 redtube_urls = RedTubeIE._extract_urls(webpage)
3203 if redtube_urls:
3204 return self.playlist_from_matches(redtube_urls, video_id, video_title, ie=RedTubeIE.ie_key())
3205
3206 # Look for embedded Tube8 player
3207 tube8_urls = Tube8IE._extract_urls(webpage)
3208 if tube8_urls:
3209 return self.playlist_from_matches(tube8_urls, video_id, video_title, ie=Tube8IE.ie_key())
3210
3211 # Look for embedded Mofosex player
3212 mofosex_urls = MofosexEmbedIE._extract_urls(webpage)
3213 if mofosex_urls:
3214 return self.playlist_from_matches(mofosex_urls, video_id, video_title, ie=MofosexEmbedIE.ie_key())
3215
3216 # Look for embedded Spankwire player
3217 spankwire_urls = SpankwireIE._extract_urls(webpage)
3218 if spankwire_urls:
3219 return self.playlist_from_matches(spankwire_urls, video_id, video_title, ie=SpankwireIE.ie_key())
3220
3221 # Look for embedded YouPorn player
3222 youporn_urls = YouPornIE._extract_urls(webpage)
3223 if youporn_urls:
3224 return self.playlist_from_matches(youporn_urls, video_id, video_title, ie=YouPornIE.ie_key())
3225
3226 # Look for embedded Tvigle player
3227 mobj = re.search(
3228 r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//cloud\.tvigle\.ru/video/.+?)\1', webpage)
3229 if mobj is not None:
3230 return self.url_result(mobj.group('url'), 'Tvigle')
3231
3232 # Look for embedded TED player
3233 ted_urls = TedEmbedIE._extract_urls(webpage)
3234 if ted_urls:
3235 return self.playlist_from_matches(ted_urls, video_id, video_title, ie=TedEmbedIE.ie_key())
3236
3237 # Look for embedded Ustream videos
3238 ustream_url = UstreamIE._extract_url(webpage)
3239 if ustream_url:
3240 return self.url_result(ustream_url, UstreamIE.ie_key())
3241
3242 # Look for embedded arte.tv player
3243 arte_urls = ArteTVEmbedIE._extract_urls(webpage)
3244 if arte_urls:
3245 return self.playlist_from_matches(arte_urls, video_id, video_title)
3246
3247 # Look for embedded francetv player
3248 mobj = re.search(
3249 r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?://)?embed\.francetv\.fr/\?ue=.+?)\1',
3250 webpage)
3251 if mobj is not None:
3252 return self.url_result(mobj.group('url'))
3253
3254 # Look for embedded Myvi.ru player
3255 myvi_url = MyviIE._extract_url(webpage)
3256 if myvi_url:
3257 return self.url_result(myvi_url)
3258
3259 # Look for embedded soundcloud player
3260 soundcloud_urls = SoundcloudEmbedIE._extract_urls(webpage)
3261 if soundcloud_urls:
3262 return self.playlist_from_matches(soundcloud_urls, video_id, video_title, getter=unescapeHTML)
3263
3264 # Look for tunein player
3265 tunein_urls = TuneInBaseIE._extract_urls(webpage)
3266 if tunein_urls:
3267 return self.playlist_from_matches(tunein_urls, video_id, video_title)
3268
3269 # Look for embedded mtvservices player
3270 mtvservices_url = MTVServicesEmbeddedIE._extract_url(webpage)
3271 if mtvservices_url:
3272 return self.url_result(mtvservices_url, ie='MTVServicesEmbedded')
3273
3274 # Look for embedded yahoo player
3275 mobj = re.search(
3276 r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:screen|movies)\.yahoo\.com/.+?\.html\?format=embed)\1',
3277 webpage)
3278 if mobj is not None:
3279 return self.url_result(mobj.group('url'), 'Yahoo')
3280
3281 # Look for embedded sbs.com.au player
3282 mobj = re.search(
3283 r'''(?x)
3284 (?:
3285 <meta\s+property="og:video"\s+content=|
3286 <iframe[^>]+?src=
3287 )
3288 (["\'])(?P<url>https?://(?:www\.)?sbs\.com\.au/ondemand/video/.+?)\1''',
3289 webpage)
3290 if mobj is not None:
3291 return self.url_result(mobj.group('url'), 'SBS')
3292
3293 # Look for embedded Cinchcast player
3294 mobj = re.search(
3295 r'<iframe[^>]+?src=(["\'])(?P<url>https?://player\.cinchcast\.com/.+?)\1',
3296 webpage)
3297 if mobj is not None:
3298 return self.url_result(mobj.group('url'), 'Cinchcast')
3299
3300 mobj = re.search(
3301 r'<iframe[^>]+?src=(["\'])(?P<url>https?://m(?:lb)?\.mlb\.com/shared/video/embed/embed\.html\?.+?)\1',
3302 webpage)
3303 if not mobj:
3304 mobj = re.search(
3305 r'data-video-link=["\'](?P<url>http://m\.mlb\.com/video/[^"\']+)',
3306 webpage)
3307 if mobj is not None:
3308 return self.url_result(mobj.group('url'), 'MLB')
3309
3310 mobj = re.search(
3311 r'<(?:iframe|script)[^>]+?src=(["\'])(?P<url>%s)\1' % CondeNastIE.EMBED_URL,
3312 webpage)
3313 if mobj is not None:
3314 return self.url_result(self._proto_relative_url(mobj.group('url'), scheme='http:'), 'CondeNast')
3315
3316 mobj = re.search(
3317 r'<iframe[^>]+src="(?P<url>https?://(?:new\.)?livestream\.com/[^"]+/player[^"]+)"',
3318 webpage)
3319 if mobj is not None:
3320 return self.url_result(mobj.group('url'), 'Livestream')
3321
3322 # Look for Zapiks embed
3323 mobj = re.search(
3324 r'<iframe[^>]+src="(?P<url>https?://(?:www\.)?zapiks\.fr/index\.php\?.+?)"', webpage)
3325 if mobj is not None:
3326 return self.url_result(mobj.group('url'), 'Zapiks')
3327
3328 # Look for Kaltura embeds
3329 kaltura_urls = KalturaIE._extract_urls(webpage)
3330 if kaltura_urls:
3331 return self.playlist_from_matches(
3332 kaltura_urls, video_id, video_title,
3333 getter=lambda x: smuggle_url(x, {'source_url': url}),
3334 ie=KalturaIE.ie_key())
3335
3336 # Look for EaglePlatform embeds
3337 eagleplatform_url = EaglePlatformIE._extract_url(webpage)
3338 if eagleplatform_url:
3339 return self.url_result(smuggle_url(eagleplatform_url, {'referrer': url}), EaglePlatformIE.ie_key())
3340
3341 # Look for ClipYou (uses EaglePlatform) embeds
3342 mobj = re.search(
3343 r'<iframe[^>]+src="https?://(?P<host>media\.clipyou\.ru)/index/player\?.*\brecord_id=(?P<id>\d+).*"', webpage)
3344 if mobj is not None:
3345 return self.url_result('eagleplatform:%(host)s:%(id)s' % mobj.groupdict(), 'EaglePlatform')
3346
3347 # Look for Pladform embeds
3348 pladform_url = PladformIE._extract_url(webpage)
3349 if pladform_url:
3350 return self.url_result(pladform_url)
3351
3352 # Look for Videomore embeds
3353 videomore_url = VideomoreIE._extract_url(webpage)
3354 if videomore_url:
3355 return self.url_result(videomore_url)
3356
3357 # Look for Webcaster embeds
3358 webcaster_url = WebcasterFeedIE._extract_url(self, webpage)
3359 if webcaster_url:
3360 return self.url_result(webcaster_url, ie=WebcasterFeedIE.ie_key())
3361
3362 # Look for Playwire embeds
3363 mobj = re.search(
3364 r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
3365 if mobj is not None:
3366 return self.url_result(mobj.group('url'))
3367
3368 # Look for Crooks and Liars embeds
3369 mobj = re.search(
3370 r'<(?:iframe[^>]+src|param[^>]+value)=(["\'])(?P<url>(?:https?:)?//embed\.crooksandliars\.com/(?:embed|v)/.+?)\1', webpage)
3371 if mobj is not None:
3372 return self.url_result(mobj.group('url'))
3373
3374 # Look for NBC Sports VPlayer embeds
3375 nbc_sports_url = NBCSportsVPlayerIE._extract_url(webpage)
3376 if nbc_sports_url:
3377 return self.url_result(nbc_sports_url, 'NBCSportsVPlayer')
3378
3379 # Look for NBC News embeds
3380 nbc_news_embed_url = re.search(
3381 r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//www\.nbcnews\.com/widget/video-embed/[^"\']+)\1', webpage)
3382 if nbc_news_embed_url:
3383 return self.url_result(nbc_news_embed_url.group('url'), 'NBCNews')
3384
3385 # Look for Google Drive embeds
3386 google_drive_url = GoogleDriveIE._extract_url(webpage)
3387 if google_drive_url:
3388 return self.url_result(google_drive_url, 'GoogleDrive')
3389
3390 # Look for UDN embeds
3391 mobj = re.search(
3392 r'<iframe[^>]+src="(?:https?:)?(?P<url>%s)"' % UDNEmbedIE._PROTOCOL_RELATIVE_VALID_URL, webpage)
3393 if mobj is not None:
3394 return self.url_result(
3395 compat_urlparse.urljoin(url, mobj.group('url')), 'UDNEmbed')
3396
3397 # Look for Senate ISVP iframe
3398 senate_isvp_url = SenateISVPIE._search_iframe_url(webpage)
3399 if senate_isvp_url:
3400 return self.url_result(senate_isvp_url, 'SenateISVP')
3401
3402 # Look for Kinja embeds
3403 kinja_embed_urls = KinjaEmbedIE._extract_urls(webpage, url)
3404 if kinja_embed_urls:
3405 return self.playlist_from_matches(
3406 kinja_embed_urls, video_id, video_title)
3407
3408 # Look for OnionStudios embeds
3409 onionstudios_url = OnionStudiosIE._extract_url(webpage)
3410 if onionstudios_url:
3411 return self.url_result(onionstudios_url)
3412
3413 # Look for Blogger embeds
3414 blogger_urls = BloggerIE._extract_urls(webpage)
3415 if blogger_urls:
3416 return self.playlist_from_matches(blogger_urls, video_id, video_title, ie=BloggerIE.ie_key())
3417
3418 # Look for ViewLift embeds
3419 viewlift_url = ViewLiftEmbedIE._extract_url(webpage)
3420 if viewlift_url:
3421 return self.url_result(viewlift_url)
3422
3423 # Look for JWPlatform embeds
3424 jwplatform_urls = JWPlatformIE._extract_urls(webpage)
3425 if jwplatform_urls:
3426 return self.playlist_from_matches(jwplatform_urls, video_id, video_title, ie=JWPlatformIE.ie_key())
3427
3428 # Look for Digiteka embeds
3429 digiteka_url = DigitekaIE._extract_url(webpage)
3430 if digiteka_url:
3431 return self.url_result(self._proto_relative_url(digiteka_url), DigitekaIE.ie_key())
3432
3433 # Look for Arkena embeds
3434 arkena_url = ArkenaIE._extract_url(webpage)
3435 if arkena_url:
3436 return self.url_result(arkena_url, ArkenaIE.ie_key())
3437
3438 # Look for Piksel embeds
3439 piksel_url = PikselIE._extract_url(webpage)
3440 if piksel_url:
3441 return self.url_result(piksel_url, PikselIE.ie_key())
3442
3443 # Look for Limelight embeds
3444 limelight_urls = LimelightBaseIE._extract_urls(webpage, url)
3445 if limelight_urls:
3446 return self.playlist_result(
3447 limelight_urls, video_id, video_title, video_description)
3448
3449 # Look for Anvato embeds
3450 anvato_urls = AnvatoIE._extract_urls(self, webpage, video_id)
3451 if anvato_urls:
3452 return self.playlist_result(
3453 anvato_urls, video_id, video_title, video_description)
3454
3455 # Look for AdobeTVVideo embeds
3456 mobj = re.search(
3457 r'<iframe[^>]+src=[\'"]((?:https?:)?//video\.tv\.adobe\.com/v/\d+[^"]+)[\'"]',
3458 webpage)
3459 if mobj is not None:
3460 return self.url_result(
3461 self._proto_relative_url(unescapeHTML(mobj.group(1))),
3462 'AdobeTVVideo')
3463
3464 # Look for Vine embeds
3465 mobj = re.search(
3466 r'<iframe[^>]+src=[\'"]((?:https?:)?//(?:www\.)?vine\.co/v/[^/]+/embed/(?:simple|postcard))',
3467 webpage)
3468 if mobj is not None:
3469 return self.url_result(
3470 self._proto_relative_url(unescapeHTML(mobj.group(1))), 'Vine')
3471
3472 # Look for VODPlatform embeds
3473 mobj = re.search(
3474 r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:(?:www\.)?vod-platform\.net|embed\.kwikmotion\.com)/[eE]mbed/.+?)\1',
3475 webpage)
3476 if mobj is not None:
3477 return self.url_result(
3478 self._proto_relative_url(unescapeHTML(mobj.group('url'))), 'VODPlatform')
3479
3480 # Look for Mangomolo embeds
3481 mobj = re.search(
3482 r'''(?x)<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//
3483 (?:
3484 admin\.mangomolo\.com/analytics/index\.php/customers/embed|
3485 player\.mangomolo\.com/v1
3486 )/
3487 (?:
3488 video\?.*?\bid=(?P<video_id>\d+)|
3489 (?:index|live)\?.*?\bchannelid=(?P<channel_id>(?:[A-Za-z0-9+/=]|%2B|%2F|%3D)+)
3490 ).+?)\1''', webpage)
3491 if mobj is not None:
3492 info = {
3493 '_type': 'url_transparent',
3494 'url': self._proto_relative_url(unescapeHTML(mobj.group('url'))),
3495 'title': video_title,
3496 'description': video_description,
3497 'thumbnail': video_thumbnail,
3498 'uploader': video_uploader,
3499 }
3500 video_id = mobj.group('video_id')
3501 if video_id:
3502 info.update({
3503 'ie_key': 'MangomoloVideo',
3504 'id': video_id,
3505 })
3506 else:
3507 info.update({
3508 'ie_key': 'MangomoloLive',
3509 'id': mobj.group('channel_id'),
3510 })
3511 return info
3512
3513 # Look for Instagram embeds
3514 instagram_embed_url = InstagramIE._extract_embed_url(webpage)
3515 if instagram_embed_url is not None:
3516 return self.url_result(
3517 self._proto_relative_url(instagram_embed_url), InstagramIE.ie_key())
3518
3519 # Look for 3Q SDN embeds
3520 threeqsdn_url = ThreeQSDNIE._extract_url(webpage)
3521 if threeqsdn_url:
3522 return {
3523 '_type': 'url_transparent',
3524 'ie_key': ThreeQSDNIE.ie_key(),
3525 'url': self._proto_relative_url(threeqsdn_url),
3526 'title': video_title,
3527 'description': video_description,
3528 'thumbnail': video_thumbnail,
3529 'uploader': video_uploader,
3530 }
3531
3532 # Look for VBOX7 embeds
3533 vbox7_url = Vbox7IE._extract_url(webpage)
3534 if vbox7_url:
3535 return self.url_result(vbox7_url, Vbox7IE.ie_key())
3536
3537 # Look for DBTV embeds
3538 dbtv_urls = DBTVIE._extract_urls(webpage)
3539 if dbtv_urls:
3540 return self.playlist_from_matches(dbtv_urls, video_id, video_title, ie=DBTVIE.ie_key())
3541
3542 # Look for Videa embeds
3543 videa_urls = VideaIE._extract_urls(webpage)
3544 if videa_urls:
3545 return self.playlist_from_matches(videa_urls, video_id, video_title, ie=VideaIE.ie_key())
3546
3547 # Look for 20 minuten embeds
3548 twentymin_urls = TwentyMinutenIE._extract_urls(webpage)
3549 if twentymin_urls:
3550 return self.playlist_from_matches(
3551 twentymin_urls, video_id, video_title, ie=TwentyMinutenIE.ie_key())
3552
3553 # Look for VideoPress embeds
3554 videopress_urls = VideoPressIE._extract_urls(webpage)
3555 if videopress_urls:
3556 return self.playlist_from_matches(
3557 videopress_urls, video_id, video_title, ie=VideoPressIE.ie_key())
3558
3559 # Look for Rutube embeds
3560 rutube_urls = RutubeIE._extract_urls(webpage)
3561 if rutube_urls:
3562 return self.playlist_from_matches(
3563 rutube_urls, video_id, video_title, ie=RutubeIE.ie_key())
3564
3565 # Look for Glomex embeds
3566 glomex_urls = list(GlomexEmbedIE._extract_urls(webpage, url))
3567 if glomex_urls:
3568 return self.playlist_from_matches(
3569 glomex_urls, video_id, video_title, ie=GlomexEmbedIE.ie_key())
3570
3571 # Look for megatv.com embeds
3572 megatvcom_urls = list(MegaTVComEmbedIE._extract_urls(webpage))
3573 if megatvcom_urls:
3574 return self.playlist_from_matches(
3575 megatvcom_urls, video_id, video_title, ie=MegaTVComEmbedIE.ie_key())
3576
3577 # Look for ant1news.gr embeds
3578 ant1newsgr_urls = list(Ant1NewsGrEmbedIE._extract_urls(webpage))
3579 if ant1newsgr_urls:
3580 return self.playlist_from_matches(
3581 ant1newsgr_urls, video_id, video_title, ie=Ant1NewsGrEmbedIE.ie_key())
3582
3583 # Look for WashingtonPost embeds
3584 wapo_urls = WashingtonPostIE._extract_urls(webpage)
3585 if wapo_urls:
3586 return self.playlist_from_matches(
3587 wapo_urls, video_id, video_title, ie=WashingtonPostIE.ie_key())
3588
3589 # Look for Mediaset embeds
3590 mediaset_urls = MediasetIE._extract_urls(self, webpage)
3591 if mediaset_urls:
3592 return self.playlist_from_matches(
3593 mediaset_urls, video_id, video_title, ie=MediasetIE.ie_key())
3594
3595 # Look for JOJ.sk embeds
3596 joj_urls = JojIE._extract_urls(webpage)
3597 if joj_urls:
3598 return self.playlist_from_matches(
3599 joj_urls, video_id, video_title, ie=JojIE.ie_key())
3600
3601 # Look for megaphone.fm embeds
3602 mpfn_urls = MegaphoneIE._extract_urls(webpage)
3603 if mpfn_urls:
3604 return self.playlist_from_matches(
3605 mpfn_urls, video_id, video_title, ie=MegaphoneIE.ie_key())
3606
3607 # Look for vzaar embeds
3608 vzaar_urls = VzaarIE._extract_urls(webpage)
3609 if vzaar_urls:
3610 return self.playlist_from_matches(
3611 vzaar_urls, video_id, video_title, ie=VzaarIE.ie_key())
3612
3613 channel9_urls = Channel9IE._extract_urls(webpage)
3614 if channel9_urls:
3615 return self.playlist_from_matches(
3616 channel9_urls, video_id, video_title, ie=Channel9IE.ie_key())
3617
3618 vshare_urls = VShareIE._extract_urls(webpage)
3619 if vshare_urls:
3620 return self.playlist_from_matches(
3621 vshare_urls, video_id, video_title, ie=VShareIE.ie_key())
3622
3623 # Look for Mediasite embeds
3624 mediasite_urls = MediasiteIE._extract_urls(webpage)
3625 if mediasite_urls:
3626 entries = [
3627 self.url_result(smuggle_url(
3628 compat_urlparse.urljoin(url, mediasite_url),
3629 {'UrlReferrer': url}), ie=MediasiteIE.ie_key())
3630 for mediasite_url in mediasite_urls]
3631 return self.playlist_result(entries, video_id, video_title)
3632
3633 springboardplatform_urls = SpringboardPlatformIE._extract_urls(webpage)
3634 if springboardplatform_urls:
3635 return self.playlist_from_matches(
3636 springboardplatform_urls, video_id, video_title,
3637 ie=SpringboardPlatformIE.ie_key())
3638
3639 yapfiles_urls = YapFilesIE._extract_urls(webpage)
3640 if yapfiles_urls:
3641 return self.playlist_from_matches(
3642 yapfiles_urls, video_id, video_title, ie=YapFilesIE.ie_key())
3643
3644 vice_urls = ViceIE._extract_urls(webpage)
3645 if vice_urls:
3646 return self.playlist_from_matches(
3647 vice_urls, video_id, video_title, ie=ViceIE.ie_key())
3648
3649 xfileshare_urls = XFileShareIE._extract_urls(webpage)
3650 if xfileshare_urls:
3651 return self.playlist_from_matches(
3652 xfileshare_urls, video_id, video_title, ie=XFileShareIE.ie_key())
3653
3654 cloudflarestream_urls = CloudflareStreamIE._extract_urls(webpage)
3655 if cloudflarestream_urls:
3656 return self.playlist_from_matches(
3657 cloudflarestream_urls, video_id, video_title, ie=CloudflareStreamIE.ie_key())
3658
3659 peertube_urls = PeerTubeIE._extract_urls(webpage, url)
3660 if peertube_urls:
3661 return self.playlist_from_matches(
3662 peertube_urls, video_id, video_title, ie=PeerTubeIE.ie_key())
3663
3664 indavideo_urls = IndavideoEmbedIE._extract_urls(webpage)
3665 if indavideo_urls:
3666 return self.playlist_from_matches(
3667 indavideo_urls, video_id, video_title, ie=IndavideoEmbedIE.ie_key())
3668
3669 apa_urls = APAIE._extract_urls(webpage)
3670 if apa_urls:
3671 return self.playlist_from_matches(
3672 apa_urls, video_id, video_title, ie=APAIE.ie_key())
3673
3674 foxnews_urls = FoxNewsIE._extract_urls(webpage)
3675 if foxnews_urls:
3676 return self.playlist_from_matches(
3677 foxnews_urls, video_id, video_title, ie=FoxNewsIE.ie_key())
3678
3679 sharevideos_urls = [sharevideos_mobj.group('url') for sharevideos_mobj in re.finditer(
3680 r'<iframe[^>]+?\bsrc\s*=\s*(["\'])(?P<url>(?:https?:)?//embed\.share-videos\.se/auto/embed/\d+\?.*?\buid=\d+.*?)\1',
3681 webpage)]
3682 if sharevideos_urls:
3683 return self.playlist_from_matches(
3684 sharevideos_urls, video_id, video_title)
3685
3686 viqeo_urls = ViqeoIE._extract_urls(webpage)
3687 if viqeo_urls:
3688 return self.playlist_from_matches(
3689 viqeo_urls, video_id, video_title, ie=ViqeoIE.ie_key())
3690
3691 expressen_urls = ExpressenIE._extract_urls(webpage)
3692 if expressen_urls:
3693 return self.playlist_from_matches(
3694 expressen_urls, video_id, video_title, ie=ExpressenIE.ie_key())
3695
3696 zype_urls = ZypeIE._extract_urls(webpage)
3697 if zype_urls:
3698 return self.playlist_from_matches(
3699 zype_urls, video_id, video_title, ie=ZypeIE.ie_key())
3700
3701 gedi_urls = GediDigitalIE._extract_urls(webpage)
3702 if gedi_urls:
3703 return self.playlist_from_matches(
3704 gedi_urls, video_id, video_title, ie=GediDigitalIE.ie_key())
3705
3706 # Look for RCS media group embeds
3707 rcs_urls = RCSEmbedsIE._extract_urls(webpage)
3708 if rcs_urls:
3709 return self.playlist_from_matches(
3710 rcs_urls, video_id, video_title, ie=RCSEmbedsIE.ie_key())
3711
3712 wimtv_urls = WimTVIE._extract_urls(webpage)
3713 if wimtv_urls:
3714 return self.playlist_from_matches(
3715 wimtv_urls, video_id, video_title, ie=WimTVIE.ie_key())
3716
3717 bitchute_urls = BitChuteIE._extract_urls(webpage)
3718 if bitchute_urls:
3719 return self.playlist_from_matches(
3720 bitchute_urls, video_id, video_title, ie=BitChuteIE.ie_key())
3721
3722 rumble_urls = RumbleEmbedIE._extract_urls(webpage)
3723 if len(rumble_urls) == 1:
3724 return self.url_result(rumble_urls[0], RumbleEmbedIE.ie_key())
3725 if rumble_urls:
3726 return self.playlist_from_matches(
3727 rumble_urls, video_id, video_title, ie=RumbleEmbedIE.ie_key())
3728
3729 # Look for (tvopen|ethnos).gr embeds
3730 tvopengr_urls = list(TVOpenGrEmbedIE._extract_urls(webpage))
3731 if tvopengr_urls:
3732 return self.playlist_from_matches(tvopengr_urls, video_id, video_title, ie=TVOpenGrEmbedIE.ie_key())
3733
3734 # Look for ert.gr webtv embeds
3735 ertwebtv_urls = list(ERTWebtvEmbedIE._extract_urls(webpage))
3736 if len(ertwebtv_urls) == 1:
3737 return self.url_result(self._proto_relative_url(ertwebtv_urls[0]), video_title=video_title, url_transparent=True)
3738 elif ertwebtv_urls:
3739 return self.playlist_from_matches(ertwebtv_urls, video_id, video_title, ie=ERTWebtvEmbedIE.ie_key())
3740
3741 tvp_urls = TVPEmbedIE._extract_urls(webpage)
3742 if tvp_urls:
3743 return self.playlist_from_matches(tvp_urls, video_id, video_title, ie=TVPEmbedIE.ie_key())
3744
3745 # Look for MainStreaming embeds
3746 mainstreaming_urls = MainStreamingIE._extract_urls(webpage)
3747 if mainstreaming_urls:
3748 return self.playlist_from_matches(mainstreaming_urls, video_id, video_title, ie=MainStreamingIE.ie_key())
3749
3750 # Look for Gfycat Embeds
3751 gfycat_urls = GfycatIE._extract_urls(webpage)
3752 if gfycat_urls:
3753 return self.playlist_from_matches(gfycat_urls, video_id, video_title, ie=GfycatIE.ie_key())
3754
3755 panopto_urls = PanoptoBaseIE._extract_urls(webpage)
3756 if panopto_urls:
3757 return self.playlist_from_matches(panopto_urls, video_id, video_title)
3758
3759 # Look for Ruutu embeds
3760 ruutu_url = RuutuIE._extract_url(webpage)
3761 if ruutu_url:
3762 return self.url_result(ruutu_url, RuutuIE)
3763
3764 # Look for HTML5 media
3765 entries = self._parse_html5_media_entries(url, webpage, video_id, m3u8_id='hls')
3766 if entries:
3767 self.report_detected('HTML5 media')
3768 if len(entries) == 1:
3769 entries[0].update({
3770 'id': video_id,
3771 'title': video_title,
3772 })
3773 else:
3774 for num, entry in enumerate(entries, start=1):
3775 entry.update({
3776 'id': '%s-%s' % (video_id, num),
3777 'title': '%s (%d)' % (video_title, num),
3778 })
3779 for entry in entries:
3780 self._sort_formats(entry['formats'])
3781 return self.playlist_result(entries, video_id, video_title)
3782
3783 jwplayer_data = self._find_jwplayer_data(
3784 webpage, video_id, transform_source=js_to_json)
3785 if jwplayer_data:
3786 if isinstance(jwplayer_data.get('playlist'), str):
3787 self.report_detected('JW Player playlist')
3788 return {
3789 **info_dict,
3790 '_type': 'url',
3791 'ie_key': JWPlatformIE.ie_key(),
3792 'url': jwplayer_data['playlist'],
3793 }
3794 try:
3795 info = self._parse_jwplayer_data(
3796 jwplayer_data, video_id, require_title=False, base_url=url)
3797 self.report_detected('JW Player data')
3798 return merge_dicts(info, info_dict)
3799 except ExtractorError:
3800 # See https://github.com/ytdl-org/youtube-dl/pull/16735
3801 pass
3802
3803 # Video.js embed
3804 mobj = re.search(
3805 r'(?s)\bvideojs\s*\(.+?([a-zA-Z0-9_$]+)\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
3806 webpage)
3807 if mobj is not None:
3808 varname = mobj.group(1)
3809 sources = self._parse_json(
3810 mobj.group(2), video_id, transform_source=js_to_json,
3811 fatal=False) or []
3812 if not isinstance(sources, list):
3813 sources = [sources]
3814 formats = []
3815 subtitles = {}
3816 for source in sources:
3817 src = source.get('src')
3818 if not src or not isinstance(src, compat_str):
3819 continue
3820 src = compat_urlparse.urljoin(url, src)
3821 src_type = source.get('type')
3822 if isinstance(src_type, compat_str):
3823 src_type = src_type.lower()
3824 ext = determine_ext(src).lower()
3825 if src_type == 'video/youtube':
3826 return self.url_result(src, YoutubeIE.ie_key())
3827 if src_type == 'application/dash+xml' or ext == 'mpd':
3828 fmts, subs = self._extract_mpd_formats_and_subtitles(
3829 src, video_id, mpd_id='dash', fatal=False)
3830 formats.extend(fmts)
3831 self._merge_subtitles(subs, target=subtitles)
3832 elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
3833 fmts, subs = self._extract_m3u8_formats_and_subtitles(
3834 src, video_id, 'mp4', entry_protocol='m3u8_native',
3835 m3u8_id='hls', fatal=False)
3836 formats.extend(fmts)
3837 self._merge_subtitles(subs, target=subtitles)
3838 else:
3839 formats.append({
3840 'url': src,
3841 'ext': (mimetype2ext(src_type)
3842 or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
3843 'http_headers': {
3844 'Referer': full_response.geturl(),
3845 },
3846 })
3847 # https://docs.videojs.com/player#addRemoteTextTrack
3848 # https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
3849 for sub_match in re.finditer(rf'(?s){re.escape(varname)}' r'\.addRemoteTextTrack\(({.+?})\s*,\s*(?:true|false)\)', webpage):
3850 sub = self._parse_json(
3851 sub_match.group(1), video_id, transform_source=js_to_json, fatal=False) or {}
3852 src = str_or_none(sub.get('src'))
3853 if not src:
3854 continue
3855 subtitles.setdefault(dict_get(sub, ('language', 'srclang')) or 'und', []).append({
3856 'url': compat_urlparse.urljoin(url, src),
3857 'name': sub.get('label'),
3858 'http_headers': {
3859 'Referer': full_response.geturl(),
3860 },
3861 })
3862 if formats or subtitles:
3863 self.report_detected('video.js embed')
3864 self._sort_formats(formats)
3865 info_dict['formats'] = formats
3866 info_dict['subtitles'] = subtitles
3867 return info_dict
3868
3869 # Looking for http://schema.org/VideoObject
3870 json_ld = self._search_json_ld(webpage, video_id, default={})
3871 if json_ld.get('url') not in (url, None):
3872 self.report_detected('JSON LD')
3873 if determine_ext(json_ld['url']) == 'm3u8':
3874 json_ld['formats'], json_ld['subtitles'] = self._extract_m3u8_formats_and_subtitles(
3875 json_ld['url'], video_id, 'mp4')
3876 json_ld.pop('url')
3877 self._sort_formats(json_ld['formats'])
3878 else:
3879 json_ld['_type'] = 'url_transparent'
3880 json_ld['url'] = smuggle_url(json_ld['url'], {'force_videoid': video_id, 'to_generic': True})
3881 return merge_dicts(json_ld, info_dict)
3882
3883 def check_video(vurl):
3884 if YoutubeIE.suitable(vurl):
3885 return True
3886 if RtmpIE.suitable(vurl):
3887 return True
3888 vpath = compat_urlparse.urlparse(vurl).path
3889 vext = determine_ext(vpath, None)
3890 return vext not in (None, 'swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
3891
3892 def filter_video(urls):
3893 return list(filter(check_video, urls))
3894
3895 # Start with something easy: JW Player in SWFObject
3896 found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
3897 if found:
3898 self.report_detected('JW Player in SFWObject')
3899 else:
3900 # Look for gorilla-vid style embedding
3901 found = filter_video(re.findall(r'''(?sx)
3902 (?:
3903 jw_plugins|
3904 JWPlayerOptions|
3905 jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
3906 )
3907 .*?
3908 ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
3909 if found:
3910 self.report_detected('JW Player embed')
3911 if not found:
3912 # Look for generic KVS player
3913 found = re.search(r'<script [^>]*?src="https?://.+?/kt_player\.js\?v=(?P<ver>(?P<maj_ver>\d+)(\.\d+)+)".*?>', webpage)
3914 if found:
3915 self.report_detected('KWS Player')
3916 if found.group('maj_ver') not in ['4', '5']:
3917 self.report_warning('Untested major version (%s) in player engine--Download may fail.' % found.group('ver'))
3918 flashvars = re.search(r'(?ms)<script.*?>.*?var\s+flashvars\s*=\s*(\{.*?\});.*?</script>', webpage)
3919 flashvars = self._parse_json(flashvars.group(1), video_id, transform_source=js_to_json)
3920
3921 # extract the part after the last / as the display_id from the
3922 # canonical URL.
3923 display_id = self._search_regex(
3924 r'(?:<link href="https?://[^"]+/(.+?)/?" rel="canonical"\s*/?>'
3925 r'|<link rel="canonical" href="https?://[^"]+/(.+?)/?"\s*/?>)',
3926 webpage, 'display_id', fatal=False
3927 )
3928 title = self._html_search_regex(r'<(?:h1|title)>(?:Video: )?(.+?)</(?:h1|title)>', webpage, 'title')
3929
3930 thumbnail = flashvars['preview_url']
3931 if thumbnail.startswith('//'):
3932 protocol, _, _ = url.partition('/')
3933 thumbnail = protocol + thumbnail
3934
3935 url_keys = list(filter(re.compile(r'video_url|video_alt_url\d*').fullmatch, flashvars.keys()))
3936 formats = []
3937 for key in url_keys:
3938 if '/get_file/' not in flashvars[key]:
3939 continue
3940 format_id = flashvars.get(f'{key}_text', key)
3941 formats.append({
3942 'url': self._kvs_getrealurl(flashvars[key], flashvars['license_code']),
3943 'format_id': format_id,
3944 'ext': 'mp4',
3945 **(parse_resolution(format_id) or parse_resolution(flashvars[key]))
3946 })
3947 if not formats[-1].get('height'):
3948 formats[-1]['quality'] = 1
3949
3950 self._sort_formats(formats)
3951
3952 return {
3953 'id': flashvars['video_id'],
3954 'display_id': display_id,
3955 'title': title,
3956 'thumbnail': thumbnail,
3957 'formats': formats,
3958 }
3959 if not found:
3960 # Broaden the search a little bit
3961 found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
3962 if found:
3963 self.report_detected('video file')
3964 if not found:
3965 # Broaden the findall a little bit: JWPlayer JS loader
3966 found = filter_video(re.findall(
3967 r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
3968 if found:
3969 self.report_detected('JW Player JS loader')
3970 if not found:
3971 # Flow player
3972 found = filter_video(re.findall(r'''(?xs)
3973 flowplayer\("[^"]+",\s*
3974 \{[^}]+?\}\s*,
3975 \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
3976 ["']?url["']?\s*:\s*["']([^"']+)["']
3977 ''', webpage))
3978 if found:
3979 self.report_detected('Flow Player')
3980 if not found:
3981 # Cinerama player
3982 found = re.findall(
3983 r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
3984 if found:
3985 self.report_detected('Cinerama player')
3986 if not found:
3987 # Try to find twitter cards info
3988 # twitter:player:stream should be checked before twitter:player since
3989 # it is expected to contain a raw stream (see
3990 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
3991 found = filter_video(re.findall(
3992 r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
3993 if found:
3994 self.report_detected('Twitter card')
3995 if not found:
3996 # We look for Open Graph info:
3997 # We have to match any number spaces between elements, some sites try to align them (eg.: statigr.am)
3998 m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
3999 # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
4000 if m_video_type is not None:
4001 found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
4002 if found:
4003 self.report_detected('Open Graph video info')
4004 if not found:
4005 REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
4006 found = re.search(
4007 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
4008 r'(?:[a-z-]+="[^"]+"\s+)*?content="%s' % REDIRECT_REGEX,
4009 webpage)
4010 if not found:
4011 # Look also in Refresh HTTP header
4012 refresh_header = head_response.headers.get('Refresh')
4013 if refresh_header:
4014 # In python 2 response HTTP headers are bytestrings
4015 if sys.version_info < (3, 0) and isinstance(refresh_header, str):
4016 refresh_header = refresh_header.decode('iso-8859-1')
4017 found = re.search(REDIRECT_REGEX, refresh_header)
4018 if found:
4019 new_url = compat_urlparse.urljoin(url, unescapeHTML(found.group(1)))
4020 if new_url != url:
4021 self.report_following_redirect(new_url)
4022 return {
4023 '_type': 'url',
4024 'url': new_url,
4025 }
4026 else:
4027 found = None
4028
4029 if not found:
4030 # twitter:player is a https URL to iframe player that may or may not
4031 # be supported by yt-dlp thus this is checked the very last (see
4032 # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
4033 embed_url = self._html_search_meta('twitter:player', webpage, default=None)
4034 if embed_url and embed_url != url:
4035 self.report_detected('twitter:player iframe')
4036 return self.url_result(embed_url)
4037
4038 if not found:
4039 raise UnsupportedError(url)
4040
4041 entries = []
4042 for video_url in orderedSet(found):
4043 video_url = unescapeHTML(video_url)
4044 video_url = video_url.replace('\\/', '/')
4045 video_url = compat_urlparse.urljoin(url, video_url)
4046 video_id = compat_urllib_parse_unquote(os.path.basename(video_url))
4047
4048 # Sometimes, jwplayer extraction will result in a YouTube URL
4049 if YoutubeIE.suitable(video_url):
4050 entries.append(self.url_result(video_url, 'Youtube'))
4051 continue
4052
4053 # here's a fun little line of code for you:
4054 video_id = os.path.splitext(video_id)[0]
4055 headers = {
4056 'referer': full_response.geturl()
4057 }
4058
4059 entry_info_dict = {
4060 'id': video_id,
4061 'uploader': video_uploader,
4062 'title': video_title,
4063 'age_limit': age_limit,
4064 'http_headers': headers,
4065 }
4066
4067 if RtmpIE.suitable(video_url):
4068 entry_info_dict.update({
4069 '_type': 'url_transparent',
4070 'ie_key': RtmpIE.ie_key(),
4071 'url': video_url,
4072 })
4073 entries.append(entry_info_dict)
4074 continue
4075
4076 ext = determine_ext(video_url)
4077 if ext == 'smil':
4078 entry_info_dict = {**self._extract_smil_info(video_url, video_id), **entry_info_dict}
4079 elif ext == 'xspf':
4080 return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
4081 elif ext == 'm3u8':
4082 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers)
4083 elif ext == 'mpd':
4084 entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers)
4085 elif ext == 'f4m':
4086 entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers)
4087 elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
4088 # Just matching .ism/manifest is not enough to be reliably sure
4089 # whether it's actually an ISM manifest or some other streaming
4090 # manifest since there are various streaming URL formats
4091 # possible (see [1]) as well as some other shenanigans like
4092 # .smil/manifest URLs that actually serve an ISM (see [2]) and
4093 # so on.
4094 # Thus the most reasonable way to solve this is to delegate
4095 # to generic extractor in order to look into the contents of
4096 # the manifest itself.
4097 # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
4098 # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
4099 entry_info_dict = self.url_result(
4100 smuggle_url(video_url, {'to_generic': True}),
4101 GenericIE.ie_key())
4102 else:
4103 entry_info_dict['url'] = video_url
4104
4105 if entry_info_dict.get('formats'):
4106 self._sort_formats(entry_info_dict['formats'])
4107
4108 entries.append(entry_info_dict)
4109
4110 if len(entries) == 1:
4111 return entries[0]
4112 else:
4113 for num, e in enumerate(entries, start=1):
4114 # 'url' results don't have a title
4115 if e.get('title') is not None:
4116 e['title'] = '%s (%d)' % (e['title'], num)
4117 return {
4118 '_type': 'playlist',
4119 'entries': entries,
4120 }