logo

youtube-dl

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

generic.py (147086B)


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