logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git

generic.py (156668B)


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