You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2872 lines
116 KiB

10 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
11 years ago
11 years ago
11 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
10 years ago
10 years ago
  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_urllib_parse_unquote,
  11. compat_urlparse,
  12. compat_xml_parse_error,
  13. )
  14. from ..utils import (
  15. determine_ext,
  16. ExtractorError,
  17. float_or_none,
  18. HEADRequest,
  19. is_html,
  20. js_to_json,
  21. orderedSet,
  22. sanitized_Request,
  23. smuggle_url,
  24. unescapeHTML,
  25. unified_strdate,
  26. unsmuggle_url,
  27. UnsupportedError,
  28. xpath_text,
  29. )
  30. from .commonprotocols import RtmpIE
  31. from .brightcove import (
  32. BrightcoveLegacyIE,
  33. BrightcoveNewIE,
  34. )
  35. from .nbc import NBCSportsVPlayerIE
  36. from .ooyala import OoyalaIE
  37. from .rutv import RUTVIE
  38. from .tvc import TVCIE
  39. from .sportbox import SportBoxEmbedIE
  40. from .smotri import SmotriIE
  41. from .myvi import MyviIE
  42. from .condenast import CondeNastIE
  43. from .udn import UDNEmbedIE
  44. from .senateisvp import SenateISVPIE
  45. from .svt import SVTIE
  46. from .pornhub import PornHubIE
  47. from .xhamster import XHamsterEmbedIE
  48. from .tnaflix import TNAFlixNetworkEmbedIE
  49. from .drtuber import DrTuberIE
  50. from .redtube import RedTubeIE
  51. from .vimeo import VimeoIE
  52. from .dailymotion import (
  53. DailymotionIE,
  54. DailymotionCloudIE,
  55. )
  56. from .onionstudios import OnionStudiosIE
  57. from .viewlift import ViewLiftEmbedIE
  58. from .mtv import MTVServicesEmbeddedIE
  59. from .pladform import PladformIE
  60. from .videomore import VideomoreIE
  61. from .webcaster import WebcasterFeedIE
  62. from .googledrive import GoogleDriveIE
  63. from .jwplatform import JWPlatformIE
  64. from .digiteka import DigitekaIE
  65. from .arkena import ArkenaIE
  66. from .instagram import InstagramIE
  67. from .liveleak import LiveLeakIE
  68. from .threeqsdn import ThreeQSDNIE
  69. from .theplatform import ThePlatformIE
  70. from .vessel import VesselIE
  71. from .kaltura import KalturaIE
  72. from .eagleplatform import EaglePlatformIE
  73. from .facebook import FacebookIE
  74. from .soundcloud import SoundcloudIE
  75. from .tunein import TuneInBaseIE
  76. from .vbox7 import Vbox7IE
  77. from .dbtv import DBTVIE
  78. from .piksel import PikselIE
  79. from .videa import VideaIE
  80. from .twentymin import TwentyMinutenIE
  81. from .ustream import UstreamIE
  82. from .openload import OpenloadIE
  83. from .videopress import VideoPressIE
  84. from .rutube import RutubeIE
  85. from .limelight import LimelightBaseIE
  86. from .anvato import AnvatoIE
  87. from .washingtonpost import WashingtonPostIE
  88. from .wistia import WistiaIE
  89. from .mediaset import MediasetIE
  90. class GenericIE(InfoExtractor):
  91. IE_DESC = 'Generic downloader that works on some sites'
  92. _VALID_URL = r'.*'
  93. IE_NAME = 'generic'
  94. _TESTS = [
  95. # Direct link to a video
  96. {
  97. 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
  98. 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
  99. 'info_dict': {
  100. 'id': 'trailer',
  101. 'ext': 'mp4',
  102. 'title': 'trailer',
  103. 'upload_date': '20100513',
  104. }
  105. },
  106. # Direct link to media delivered compressed (until Accept-Encoding is *)
  107. {
  108. 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
  109. 'md5': '128c42e68b13950268b648275386fc74',
  110. 'info_dict': {
  111. 'id': 'FictionJunction-Parallel_Hearts',
  112. 'ext': 'flac',
  113. 'title': 'FictionJunction-Parallel_Hearts',
  114. 'upload_date': '20140522',
  115. },
  116. 'expected_warnings': [
  117. 'URL could be a direct video link, returning it as such.'
  118. ],
  119. 'skip': 'URL invalid',
  120. },
  121. # Direct download with broken HEAD
  122. {
  123. 'url': 'http://ai-radio.org:8000/radio.opus',
  124. 'info_dict': {
  125. 'id': 'radio',
  126. 'ext': 'opus',
  127. 'title': 'radio',
  128. },
  129. 'params': {
  130. 'skip_download': True, # infinite live stream
  131. },
  132. 'expected_warnings': [
  133. r'501.*Not Implemented',
  134. r'400.*Bad Request',
  135. ],
  136. },
  137. # Direct link with incorrect MIME type
  138. {
  139. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  140. 'md5': '4ccbebe5f36706d85221f204d7eb5913',
  141. 'info_dict': {
  142. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  143. 'id': '5_Lennart_Poettering_-_Systemd',
  144. 'ext': 'webm',
  145. 'title': '5_Lennart_Poettering_-_Systemd',
  146. 'upload_date': '20141120',
  147. },
  148. 'expected_warnings': [
  149. 'URL could be a direct video link, returning it as such.'
  150. ]
  151. },
  152. # RSS feed
  153. {
  154. 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  155. 'info_dict': {
  156. 'id': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  157. 'title': 'Zero Punctuation',
  158. 'description': 're:.*groundbreaking video review series.*'
  159. },
  160. 'playlist_mincount': 11,
  161. },
  162. # RSS feed with enclosure
  163. {
  164. 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  165. 'info_dict': {
  166. 'id': 'pdv_maddow_netcast_m4v-02-27-2015-201624',
  167. 'ext': 'm4v',
  168. 'upload_date': '20150228',
  169. 'title': 'pdv_maddow_netcast_m4v-02-27-2015-201624',
  170. }
  171. },
  172. # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
  173. {
  174. 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
  175. 'info_dict': {
  176. 'id': 'smil',
  177. 'ext': 'mp4',
  178. 'title': 'Automatics, robotics and biocybernetics',
  179. 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
  180. 'upload_date': '20130627',
  181. 'formats': 'mincount:16',
  182. 'subtitles': 'mincount:1',
  183. },
  184. 'params': {
  185. 'force_generic_extractor': True,
  186. 'skip_download': True,
  187. },
  188. },
  189. # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
  190. {
  191. 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
  192. 'info_dict': {
  193. 'id': 'hds',
  194. 'ext': 'flv',
  195. 'title': 'hds',
  196. 'formats': 'mincount:1',
  197. },
  198. 'params': {
  199. 'skip_download': True,
  200. },
  201. },
  202. # SMIL from https://www.restudy.dk/video/play/id/1637
  203. {
  204. 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
  205. 'info_dict': {
  206. 'id': 'video_1637',
  207. 'ext': 'flv',
  208. 'title': 'video_1637',
  209. 'formats': 'mincount:3',
  210. },
  211. 'params': {
  212. 'skip_download': True,
  213. },
  214. },
  215. # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
  216. {
  217. 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
  218. 'info_dict': {
  219. 'id': 'smil-service',
  220. 'ext': 'flv',
  221. 'title': 'smil-service',
  222. 'formats': 'mincount:1',
  223. },
  224. 'params': {
  225. 'skip_download': True,
  226. },
  227. },
  228. # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
  229. {
  230. 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
  231. 'info_dict': {
  232. 'id': '4719370',
  233. 'ext': 'mp4',
  234. 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
  235. 'formats': 'mincount:3',
  236. },
  237. 'params': {
  238. 'skip_download': True,
  239. },
  240. },
  241. # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
  242. {
  243. 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
  244. 'info_dict': {
  245. 'id': 'mZlp2ctYIUEB',
  246. 'ext': 'mp4',
  247. 'title': 'Tikibad ontruimd wegens brand',
  248. 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
  249. 'thumbnail': r're:^https?://.*\.jpg$',
  250. 'duration': 33,
  251. },
  252. 'params': {
  253. 'skip_download': True,
  254. },
  255. },
  256. # MPD from http://dash-mse-test.appspot.com/media.html
  257. {
  258. 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
  259. 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
  260. 'info_dict': {
  261. 'id': 'car-20120827-manifest',
  262. 'ext': 'mp4',
  263. 'title': 'car-20120827-manifest',
  264. 'formats': 'mincount:9',
  265. 'upload_date': '20130904',
  266. },
  267. 'params': {
  268. 'format': 'bestvideo',
  269. },
  270. },
  271. # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
  272. {
  273. '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',
  274. 'info_dict': {
  275. 'id': 'content',
  276. 'ext': 'mp4',
  277. 'title': 'content',
  278. 'formats': 'mincount:8',
  279. },
  280. 'params': {
  281. # m3u8 downloads
  282. 'skip_download': True,
  283. },
  284. 'skip': 'video gone',
  285. },
  286. # m3u8 served with Content-Type: text/plain
  287. {
  288. 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
  289. 'info_dict': {
  290. 'id': 'index',
  291. 'ext': 'mp4',
  292. 'title': 'index',
  293. 'upload_date': '20140720',
  294. 'formats': 'mincount:11',
  295. },
  296. 'params': {
  297. # m3u8 downloads
  298. 'skip_download': True,
  299. },
  300. 'skip': 'video gone',
  301. },
  302. # google redirect
  303. {
  304. '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',
  305. 'info_dict': {
  306. 'id': 'cmQHVoWB5FY',
  307. 'ext': 'mp4',
  308. 'upload_date': '20130224',
  309. 'uploader_id': 'TheVerge',
  310. 'description': r're:^Chris Ziegler takes a look at the\.*',
  311. 'uploader': 'The Verge',
  312. 'title': 'First Firefox OS phones side-by-side',
  313. },
  314. 'params': {
  315. 'skip_download': False,
  316. }
  317. },
  318. {
  319. # redirect in Refresh HTTP header
  320. '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',
  321. 'info_dict': {
  322. 'id': 'pO8h3EaFRdo',
  323. 'ext': 'mp4',
  324. 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
  325. 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
  326. 'upload_date': '20150917',
  327. 'uploader_id': 'brtvofficial',
  328. 'uploader': 'Boiler Room',
  329. },
  330. 'params': {
  331. 'skip_download': False,
  332. },
  333. },
  334. {
  335. 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
  336. 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
  337. 'info_dict': {
  338. 'id': '13601338388002',
  339. 'ext': 'mp4',
  340. 'uploader': 'www.hodiho.fr',
  341. 'title': 'R\u00e9gis plante sa Jeep',
  342. }
  343. },
  344. # bandcamp page with custom domain
  345. {
  346. 'add_ie': ['Bandcamp'],
  347. 'url': 'http://bronyrock.com/track/the-pony-mash',
  348. 'info_dict': {
  349. 'id': '3235767654',
  350. 'ext': 'mp3',
  351. 'title': 'The Pony Mash',
  352. 'uploader': 'M_Pallante',
  353. },
  354. 'skip': 'There is a limit of 200 free downloads / month for the test song',
  355. },
  356. {
  357. # embedded brightcove video
  358. # it also tests brightcove videos that need to set the 'Referer'
  359. # in the http requests
  360. 'add_ie': ['BrightcoveLegacy'],
  361. 'url': 'http://www.bfmtv.com/video/bfmbusiness/cours-bourse/cours-bourse-l-analyse-technique-154522/',
  362. 'info_dict': {
  363. 'id': '2765128793001',
  364. 'ext': 'mp4',
  365. 'title': 'Le cours de bourse : l’analyse technique',
  366. 'description': 'md5:7e9ad046e968cb2d1114004aba466fd9',
  367. 'uploader': 'BFM BUSINESS',
  368. },
  369. 'params': {
  370. 'skip_download': True,
  371. },
  372. },
  373. {
  374. # embedded with itemprop embedURL and video id spelled as `idVideo`
  375. 'add_id': ['BrightcoveLegacy'],
  376. 'url': 'http://bfmbusiness.bfmtv.com/mediaplayer/chroniques/olivier-delamarche/',
  377. 'info_dict': {
  378. 'id': '5255628253001',
  379. 'ext': 'mp4',
  380. 'title': 'md5:37c519b1128915607601e75a87995fc0',
  381. 'description': 'md5:37f7f888b434bb8f8cc8dbd4f7a4cf26',
  382. 'uploader': 'BFM BUSINESS',
  383. 'uploader_id': '876450612001',
  384. 'timestamp': 1482255315,
  385. 'upload_date': '20161220',
  386. },
  387. 'params': {
  388. 'skip_download': True,
  389. },
  390. },
  391. {
  392. # https://github.com/rg3/youtube-dl/issues/2253
  393. 'url': 'http://bcove.me/i6nfkrc3',
  394. 'md5': '0ba9446db037002366bab3b3eb30c88c',
  395. 'info_dict': {
  396. 'id': '3101154703001',
  397. 'ext': 'mp4',
  398. 'title': 'Still no power',
  399. 'uploader': 'thestar.com',
  400. '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.',
  401. },
  402. 'add_ie': ['BrightcoveLegacy'],
  403. 'skip': 'video gone',
  404. },
  405. {
  406. 'url': 'http://www.championat.com/video/football/v/87/87499.html',
  407. 'md5': 'fb973ecf6e4a78a67453647444222983',
  408. 'info_dict': {
  409. 'id': '3414141473001',
  410. 'ext': 'mp4',
  411. 'title': 'Видео. Удаление Дзагоева (ЦСКА)',
  412. 'description': 'Онлайн-трансляция матча ЦСКА - "Волга"',
  413. 'uploader': 'Championat',
  414. },
  415. },
  416. {
  417. # https://github.com/rg3/youtube-dl/issues/3541
  418. 'add_ie': ['BrightcoveLegacy'],
  419. 'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
  420. 'info_dict': {
  421. 'id': '3866516442001',
  422. 'ext': 'mp4',
  423. 'title': 'Leer mij vrouwen kennen: Aflevering 1',
  424. 'description': 'Leer mij vrouwen kennen: Aflevering 1',
  425. 'uploader': 'SBS Broadcasting',
  426. },
  427. 'skip': 'Restricted to Netherlands',
  428. 'params': {
  429. 'skip_download': True, # m3u8 download
  430. },
  431. },
  432. {
  433. # Brightcove video in <iframe>
  434. 'url': 'http://www.un.org/chinese/News/story.asp?NewsID=27724',
  435. 'md5': '36d74ef5e37c8b4a2ce92880d208b968',
  436. 'info_dict': {
  437. 'id': '5360463607001',
  438. 'ext': 'mp4',
  439. 'title': '叙利亚失明儿童在废墟上演唱《心跳》 呼吁获得正常童年生活',
  440. 'description': '联合国儿童基金会中东和北非区域大使、作曲家扎德·迪拉尼(Zade Dirani)在3月15日叙利亚冲突爆发7周年纪念日之际发布了为叙利亚谱写的歌曲《心跳》(HEARTBEAT),为受到六年冲突影响的叙利亚儿童发出强烈呐喊,呼吁世界做出共同努力,使叙利亚儿童重新获得享有正常童年生活的权利。',
  441. 'uploader': 'United Nations',
  442. 'uploader_id': '1362235914001',
  443. 'timestamp': 1489593889,
  444. 'upload_date': '20170315',
  445. },
  446. 'add_ie': ['BrightcoveLegacy'],
  447. },
  448. {
  449. # Brightcove with alternative playerID key
  450. 'url': 'http://www.nature.com/nmeth/journal/v9/n7/fig_tab/nmeth.2062_SV1.html',
  451. 'info_dict': {
  452. 'id': 'nmeth.2062_SV1',
  453. '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',
  454. },
  455. 'playlist': [{
  456. 'info_dict': {
  457. 'id': '2228375078001',
  458. 'ext': 'mp4',
  459. 'title': 'nmeth.2062-sv1',
  460. 'description': 'nmeth.2062-sv1',
  461. 'timestamp': 1363357591,
  462. 'upload_date': '20130315',
  463. 'uploader': 'Nature Publishing Group',
  464. 'uploader_id': '1964492299001',
  465. },
  466. }],
  467. },
  468. {
  469. # Brightcove with UUID in videoPlayer
  470. 'url': 'http://www8.hp.com/cn/zh/home.html',
  471. 'info_dict': {
  472. 'id': '5255815316001',
  473. 'ext': 'mp4',
  474. 'title': 'Sprocket Video - China',
  475. 'description': 'Sprocket Video - China',
  476. 'uploader': 'HP-Video Gallery',
  477. 'timestamp': 1482263210,
  478. 'upload_date': '20161220',
  479. 'uploader_id': '1107601872001',
  480. },
  481. 'params': {
  482. 'skip_download': True, # m3u8 download
  483. },
  484. 'skip': 'video rotates...weekly?',
  485. },
  486. {
  487. # Brightcove:new type [2].
  488. 'url': 'http://www.delawaresportszone.com/video-st-thomas-more-earns-first-trip-to-basketball-semis',
  489. 'md5': '2b35148fcf48da41c9fb4591650784f3',
  490. 'info_dict': {
  491. 'id': '5348741021001',
  492. 'ext': 'mp4',
  493. 'upload_date': '20170306',
  494. 'uploader_id': '4191638492001',
  495. 'timestamp': 1488769918,
  496. 'title': 'VIDEO: St. Thomas More earns first trip to basketball semis',
  497. },
  498. },
  499. {
  500. # Alternative brightcove <video> attributes
  501. '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/',
  502. 'info_dict': {
  503. 'id': '81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche',
  504. '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",
  505. },
  506. 'playlist': [{
  507. 'md5': '732d22ba3d33f2f3fc253c39f8f36523',
  508. 'info_dict': {
  509. 'id': '5311302538001',
  510. 'ext': 'mp4',
  511. 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche",
  512. 'description': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche (France 2, 5 février 2017)",
  513. 'timestamp': 1486321708,
  514. 'upload_date': '20170205',
  515. 'uploader_id': '800000640001',
  516. },
  517. 'only_matching': True,
  518. }],
  519. },
  520. {
  521. # Brightcove with UUID in videoPlayer
  522. 'url': 'http://www8.hp.com/cn/zh/home.html',
  523. 'info_dict': {
  524. 'id': '5255815316001',
  525. 'ext': 'mp4',
  526. 'title': 'Sprocket Video - China',
  527. 'description': 'Sprocket Video - China',
  528. 'uploader': 'HP-Video Gallery',
  529. 'timestamp': 1482263210,
  530. 'upload_date': '20161220',
  531. 'uploader_id': '1107601872001',
  532. },
  533. 'params': {
  534. 'skip_download': True, # m3u8 download
  535. },
  536. },
  537. # ooyala video
  538. {
  539. 'url': 'http://www.rollingstone.com/music/videos/norwegian-dj-cashmere-cat-goes-spartan-on-with-me-premiere-20131219',
  540. 'md5': '166dd577b433b4d4ebfee10b0824d8ff',
  541. 'info_dict': {
  542. 'id': 'BwY2RxaTrTkslxOfcan0UCf0YqyvWysJ',
  543. 'ext': 'mp4',
  544. 'title': '2cc213299525360.mov', # that's what we get
  545. 'duration': 238.231,
  546. },
  547. 'add_ie': ['Ooyala'],
  548. },
  549. {
  550. # ooyala video embedded with http://player.ooyala.com/iframe.js
  551. 'url': 'http://www.macrumors.com/2015/07/24/steve-jobs-the-man-in-the-machine-first-trailer/',
  552. 'info_dict': {
  553. 'id': 'p0MGJndjoG5SOKqO_hZJuZFPB-Tr5VgB',
  554. 'ext': 'mp4',
  555. 'title': '"Steve Jobs: Man in the Machine" trailer',
  556. 'description': 'The first trailer for the Alex Gibney documentary "Steve Jobs: Man in the Machine."',
  557. 'duration': 135.427,
  558. },
  559. 'params': {
  560. 'skip_download': True,
  561. },
  562. 'skip': 'movie expired',
  563. },
  564. # embed.ly video
  565. {
  566. 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
  567. 'info_dict': {
  568. 'id': '9ODmcdjQcHQ',
  569. 'ext': 'mp4',
  570. 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
  571. 'upload_date': '20140225',
  572. 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
  573. 'uploader': 'Tested',
  574. 'uploader_id': 'testedcom',
  575. },
  576. # No need to test YoutubeIE here
  577. 'params': {
  578. 'skip_download': True,
  579. },
  580. },
  581. # funnyordie embed
  582. {
  583. 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
  584. 'info_dict': {
  585. 'id': '18e820ec3f',
  586. 'ext': 'mp4',
  587. 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
  588. 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
  589. },
  590. # HEAD requests lead to endless 301, while GET is OK
  591. 'expected_warnings': ['301'],
  592. },
  593. # RUTV embed
  594. {
  595. 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
  596. 'info_dict': {
  597. 'id': '776940',
  598. 'ext': 'mp4',
  599. 'title': 'Охотское море стало целиком российским',
  600. 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
  601. },
  602. 'params': {
  603. # m3u8 download
  604. 'skip_download': True,
  605. },
  606. },
  607. # TVC embed
  608. {
  609. '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/',
  610. 'info_dict': {
  611. 'id': '55304',
  612. 'ext': 'mp4',
  613. 'title': 'Дошкольное воспитание',
  614. },
  615. },
  616. # SportBox embed
  617. {
  618. 'url': 'http://www.vestifinance.ru/articles/25753',
  619. 'info_dict': {
  620. 'id': '25753',
  621. 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
  622. },
  623. 'playlist': [{
  624. 'info_dict': {
  625. 'id': '370908',
  626. 'title': 'Госзаказ. День 3',
  627. 'ext': 'mp4',
  628. }
  629. }, {
  630. 'info_dict': {
  631. 'id': '370905',
  632. 'title': 'Госзаказ. День 2',
  633. 'ext': 'mp4',
  634. }
  635. }, {
  636. 'info_dict': {
  637. 'id': '370902',
  638. 'title': 'Госзаказ. День 1',
  639. 'ext': 'mp4',
  640. }
  641. }],
  642. 'params': {
  643. # m3u8 download
  644. 'skip_download': True,
  645. },
  646. },
  647. # Myvi.ru embed
  648. {
  649. 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
  650. 'info_dict': {
  651. 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
  652. 'ext': 'mp4',
  653. 'title': 'Ужастики, русский трейлер (2015)',
  654. 'thumbnail': r're:^https?://.*\.jpg$',
  655. 'duration': 153,
  656. }
  657. },
  658. # XHamster embed
  659. {
  660. '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',
  661. 'info_dict': {
  662. 'id': 'showthread',
  663. 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
  664. },
  665. 'playlist_mincount': 7,
  666. # This forum does not allow <iframe> syntaxes anymore
  667. # Now HTML tags are displayed as-is
  668. 'skip': 'No videos on this page',
  669. },
  670. # Embedded TED video
  671. {
  672. 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
  673. 'md5': '65fdff94098e4a607385a60c5177c638',
  674. 'info_dict': {
  675. 'id': '1969',
  676. 'ext': 'mp4',
  677. 'title': 'Hidden miracles of the natural world',
  678. 'uploader': 'Louie Schwartzberg',
  679. 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
  680. }
  681. },
  682. # nowvideo embed hidden behind percent encoding
  683. {
  684. 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
  685. 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
  686. 'info_dict': {
  687. 'id': '06e53103ca9aa',
  688. 'ext': 'flv',
  689. 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
  690. 'description': 'No description',
  691. },
  692. },
  693. # arte embed
  694. {
  695. 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
  696. 'md5': '7653032cbb25bf6c80d80f217055fa43',
  697. 'info_dict': {
  698. 'id': '048195-004_PLUS7-F',
  699. 'ext': 'flv',
  700. 'title': 'X:enius',
  701. 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
  702. 'upload_date': '20140320',
  703. },
  704. 'params': {
  705. 'skip_download': 'Requires rtmpdump'
  706. },
  707. 'skip': 'video gone',
  708. },
  709. # francetv embed
  710. {
  711. 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
  712. 'info_dict': {
  713. 'id': 'EV_30231',
  714. 'ext': 'mp4',
  715. 'title': 'Alcaline, le concert avec Calogero',
  716. 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
  717. 'upload_date': '20150226',
  718. 'timestamp': 1424989860,
  719. 'duration': 5400,
  720. },
  721. 'params': {
  722. # m3u8 downloads
  723. 'skip_download': True,
  724. },
  725. 'expected_warnings': [
  726. 'Forbidden'
  727. ]
  728. },
  729. # Condé Nast embed
  730. {
  731. 'url': 'http://www.wired.com/2014/04/honda-asimo/',
  732. 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
  733. 'info_dict': {
  734. 'id': '53501be369702d3275860000',
  735. 'ext': 'mp4',
  736. 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
  737. }
  738. },
  739. # Dailymotion embed
  740. {
  741. 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
  742. 'md5': '441aeeb82eb72c422c7f14ec533999cd',
  743. 'info_dict': {
  744. 'id': 'k2mm4bCdJ6CQ2i7c8o2',
  745. 'ext': 'mp4',
  746. 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
  747. 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
  748. 'uploader': 'Spi0n',
  749. 'uploader_id': 'xgditw',
  750. 'upload_date': '20140425',
  751. 'timestamp': 1398441542,
  752. },
  753. 'add_ie': ['Dailymotion'],
  754. },
  755. # YouTube embed
  756. {
  757. 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
  758. 'info_dict': {
  759. 'id': 'FXRb4ykk4S0',
  760. 'ext': 'mp4',
  761. 'title': 'The NBL Auction 2014',
  762. 'uploader': 'BADMINTON England',
  763. 'uploader_id': 'BADMINTONEvents',
  764. 'upload_date': '20140603',
  765. 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
  766. },
  767. 'add_ie': ['Youtube'],
  768. 'params': {
  769. 'skip_download': True,
  770. }
  771. },
  772. # MTVSercices embed
  773. {
  774. 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
  775. 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
  776. 'info_dict': {
  777. 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
  778. 'ext': 'mp4',
  779. 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
  780. 'description': 'Two valets share their love for movie star Liam Neesons.',
  781. 'timestamp': 1349922600,
  782. 'upload_date': '20121011',
  783. },
  784. },
  785. # YouTube embed via <data-embed-url="">
  786. {
  787. 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
  788. 'info_dict': {
  789. 'id': '4vAffPZIT44',
  790. 'ext': 'mp4',
  791. 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
  792. 'uploader': 'Gameloft',
  793. 'uploader_id': 'gameloft',
  794. 'upload_date': '20140828',
  795. 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
  796. },
  797. 'params': {
  798. 'skip_download': True,
  799. }
  800. },
  801. # YouTube <object> embed
  802. {
  803. 'url': 'http://www.improbable.com/2017/04/03/untrained-modern-youths-and-ancient-masters-in-selfie-portraits/',
  804. 'md5': '516718101ec834f74318df76259fb3cc',
  805. 'info_dict': {
  806. 'id': 'msN87y-iEx0',
  807. 'ext': 'webm',
  808. 'title': 'Feynman: Mirrors FUN TO IMAGINE 6',
  809. 'upload_date': '20080526',
  810. 'description': 'md5:0ffc78ea3f01b2e2c247d5f8d1d3c18d',
  811. 'uploader': 'Christopher Sykes',
  812. 'uploader_id': 'ChristopherJSykes',
  813. },
  814. 'add_ie': ['Youtube'],
  815. },
  816. # Camtasia studio
  817. {
  818. 'url': 'http://www.ll.mit.edu/workshops/education/videocourses/antennas/lecture1/video/',
  819. 'playlist': [{
  820. 'md5': '0c5e352edabf715d762b0ad4e6d9ee67',
  821. 'info_dict': {
  822. 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
  823. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - video1',
  824. 'ext': 'flv',
  825. 'duration': 2235.90,
  826. }
  827. }, {
  828. 'md5': '10e4bb3aaca9fd630e273ff92d9f3c63',
  829. 'info_dict': {
  830. 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final_PIP',
  831. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - pip',
  832. 'ext': 'flv',
  833. 'duration': 2235.93,
  834. }
  835. }],
  836. 'info_dict': {
  837. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
  838. }
  839. },
  840. # Flowplayer
  841. {
  842. 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
  843. 'md5': '9d65602bf31c6e20014319c7d07fba27',
  844. 'info_dict': {
  845. 'id': '5123ea6d5e5a7',
  846. 'ext': 'mp4',
  847. 'age_limit': 18,
  848. 'uploader': 'www.handjobhub.com',
  849. 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
  850. }
  851. },
  852. # Multiple brightcove videos
  853. # https://github.com/rg3/youtube-dl/issues/2283
  854. {
  855. 'url': 'http://www.newyorker.com/online/blogs/newsdesk/2014/01/always-never-nuclear-command-and-control.html',
  856. 'info_dict': {
  857. 'id': 'always-never',
  858. 'title': 'Always / Never - The New Yorker',
  859. },
  860. 'playlist_count': 3,
  861. 'params': {
  862. 'extract_flat': False,
  863. 'skip_download': True,
  864. }
  865. },
  866. # MLB embed
  867. {
  868. 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
  869. 'md5': '96f09a37e44da40dd083e12d9a683327',
  870. 'info_dict': {
  871. 'id': '33322633',
  872. 'ext': 'mp4',
  873. 'title': 'Ump changes call to ball',
  874. 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
  875. 'duration': 48,
  876. 'timestamp': 1401537900,
  877. 'upload_date': '20140531',
  878. 'thumbnail': r're:^https?://.*\.jpg$',
  879. },
  880. },
  881. # Wistia embed
  882. {
  883. 'url': 'http://study.com/academy/lesson/north-american-exploration-failed-colonies-of-spain-france-england.html#lesson',
  884. 'md5': '1953f3a698ab51cfc948ed3992a0b7ff',
  885. 'info_dict': {
  886. 'id': '6e2wtrbdaf',
  887. 'ext': 'mov',
  888. 'title': 'paywall_north-american-exploration-failed-colonies-of-spain-france-england',
  889. 'description': 'a Paywall Videos video from Remilon',
  890. 'duration': 644.072,
  891. 'uploader': 'study.com',
  892. 'timestamp': 1459678540,
  893. 'upload_date': '20160403',
  894. 'filesize': 24687186,
  895. },
  896. },
  897. {
  898. 'url': 'http://thoughtworks.wistia.com/medias/uxjb0lwrcz',
  899. 'md5': 'baf49c2baa8a7de5f3fc145a8506dcd4',
  900. 'info_dict': {
  901. 'id': 'uxjb0lwrcz',
  902. 'ext': 'mp4',
  903. 'title': 'Conversation about Hexagonal Rails Part 1',
  904. 'description': 'a Martin Fowler video from ThoughtWorks',
  905. 'duration': 1715.0,
  906. 'uploader': 'thoughtworks.wistia.com',
  907. 'timestamp': 1401832161,
  908. 'upload_date': '20140603',
  909. },
  910. },
  911. # Wistia standard embed (async)
  912. {
  913. 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
  914. 'info_dict': {
  915. 'id': '807fafadvk',
  916. 'ext': 'mp4',
  917. 'title': 'Drip Brennan Dunn Workshop',
  918. 'description': 'a JV Webinars video from getdrip-1',
  919. 'duration': 4986.95,
  920. 'timestamp': 1463607249,
  921. 'upload_date': '20160518',
  922. },
  923. 'params': {
  924. 'skip_download': True,
  925. }
  926. },
  927. # Soundcloud embed
  928. {
  929. 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
  930. 'info_dict': {
  931. 'id': '174391317',
  932. 'ext': 'mp3',
  933. 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
  934. 'uploader': 'Sophos Security',
  935. 'title': 'Chet Chat 171 - Oct 29, 2014',
  936. 'upload_date': '20141029',
  937. }
  938. },
  939. # Soundcloud multiple embeds
  940. {
  941. 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
  942. 'info_dict': {
  943. 'id': '52809',
  944. 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
  945. },
  946. 'playlist_mincount': 7,
  947. },
  948. # TuneIn station embed
  949. {
  950. 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
  951. 'info_dict': {
  952. 'id': '204146',
  953. 'ext': 'mp3',
  954. 'title': 'CNRV',
  955. 'location': 'Paris, France',
  956. 'is_live': True,
  957. },
  958. 'params': {
  959. # Live stream
  960. 'skip_download': True,
  961. },
  962. },
  963. # Livestream embed
  964. {
  965. 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
  966. 'info_dict': {
  967. 'id': '67864563',
  968. 'ext': 'flv',
  969. 'upload_date': '20141112',
  970. 'title': 'Rosetta #CometLanding webcast HL 10',
  971. }
  972. },
  973. # Another Livestream embed, without 'new.' in URL
  974. {
  975. 'url': 'https://www.freespeech.org/',
  976. 'info_dict': {
  977. 'id': '123537347',
  978. 'ext': 'mp4',
  979. 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
  980. },
  981. 'params': {
  982. # Live stream
  983. 'skip_download': True,
  984. },
  985. },
  986. # LazyYT
  987. {
  988. 'url': 'https://skiplagged.com/',
  989. 'info_dict': {
  990. 'id': 'skiplagged',
  991. 'title': 'Skiplagged: The smart way to find cheap flights',
  992. },
  993. 'playlist_mincount': 1,
  994. 'add_ie': ['Youtube'],
  995. },
  996. # Cinchcast embed
  997. {
  998. 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
  999. 'info_dict': {
  1000. 'id': '7141703',
  1001. 'ext': 'mp3',
  1002. 'upload_date': '20141126',
  1003. 'title': 'Jack Tips: 5 Steps to Permanent Gut Healing',
  1004. }
  1005. },
  1006. # Cinerama player
  1007. {
  1008. 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
  1009. 'info_dict': {
  1010. 'id': '730m_DandD_1901_512k',
  1011. 'ext': 'mp4',
  1012. 'uploader': 'www.abc.net.au',
  1013. 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
  1014. }
  1015. },
  1016. # embedded viddler video
  1017. {
  1018. 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
  1019. 'info_dict': {
  1020. 'id': '4d03aad9',
  1021. 'ext': 'mp4',
  1022. 'uploader': 'deadspin',
  1023. 'title': 'WALL-TO-GORTAT',
  1024. 'timestamp': 1422285291,
  1025. 'upload_date': '20150126',
  1026. },
  1027. 'add_ie': ['Viddler'],
  1028. },
  1029. # Libsyn embed
  1030. {
  1031. 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
  1032. 'info_dict': {
  1033. 'id': '3377616',
  1034. 'ext': 'mp3',
  1035. 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
  1036. 'description': 'md5:601cb790edd05908957dae8aaa866465',
  1037. 'upload_date': '20150220',
  1038. },
  1039. 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
  1040. },
  1041. # jwplayer YouTube
  1042. {
  1043. 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
  1044. 'info_dict': {
  1045. 'id': 'Mrj4DVp2zeA',
  1046. 'ext': 'mp4',
  1047. 'upload_date': '20150212',
  1048. 'uploader': 'The National Archives UK',
  1049. 'description': 'md5:a236581cd2449dd2df4f93412f3f01c6',
  1050. 'uploader_id': 'NationalArchives08',
  1051. 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
  1052. },
  1053. },
  1054. # jwplayer rtmp
  1055. {
  1056. 'url': 'http://www.suffolk.edu/sjc/',
  1057. 'info_dict': {
  1058. 'id': 'sjclive',
  1059. 'ext': 'flv',
  1060. 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
  1061. 'uploader': 'www.suffolk.edu',
  1062. },
  1063. 'params': {
  1064. 'skip_download': True,
  1065. }
  1066. },
  1067. # Complex jwplayer
  1068. {
  1069. 'url': 'http://www.indiedb.com/games/king-machine/videos',
  1070. 'info_dict': {
  1071. 'id': 'videos',
  1072. 'ext': 'mp4',
  1073. 'title': 'king machine trailer 1',
  1074. 'thumbnail': r're:^https?://.*\.jpg$',
  1075. },
  1076. },
  1077. {
  1078. # JWPlayer config passed as variable
  1079. 'url': 'http://www.txxx.com/videos/3326530/ariele/',
  1080. 'info_dict': {
  1081. 'id': '3326530_hq',
  1082. 'ext': 'mp4',
  1083. 'title': 'ARIELE | Tube Cup',
  1084. 'uploader': 'www.txxx.com',
  1085. 'age_limit': 18,
  1086. },
  1087. 'params': {
  1088. 'skip_download': True,
  1089. }
  1090. },
  1091. # rtl.nl embed
  1092. {
  1093. 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
  1094. 'playlist_mincount': 5,
  1095. 'info_dict': {
  1096. 'id': 'aanslagen-kopenhagen',
  1097. 'title': 'Aanslagen Kopenhagen | RTL Nieuws',
  1098. }
  1099. },
  1100. # Zapiks embed
  1101. {
  1102. 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
  1103. 'info_dict': {
  1104. 'id': '118046',
  1105. 'ext': 'mp4',
  1106. 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
  1107. }
  1108. },
  1109. # Kaltura embed (different embed code)
  1110. {
  1111. 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
  1112. 'info_dict': {
  1113. 'id': '1_a52wc67y',
  1114. 'ext': 'flv',
  1115. 'upload_date': '20150127',
  1116. 'uploader_id': 'PremierMedia',
  1117. 'timestamp': int,
  1118. 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
  1119. },
  1120. },
  1121. # Kaltura embed with single quotes
  1122. {
  1123. 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
  1124. 'info_dict': {
  1125. 'id': '0_izeg5utt',
  1126. 'ext': 'mp4',
  1127. 'title': '35871',
  1128. 'timestamp': 1355743100,
  1129. 'upload_date': '20121217',
  1130. 'uploader_id': 'batchUser',
  1131. },
  1132. 'add_ie': ['Kaltura'],
  1133. },
  1134. {
  1135. # Kaltura embedded via quoted entry_id
  1136. 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
  1137. 'info_dict': {
  1138. 'id': '0_utuok90b',
  1139. 'ext': 'mp4',
  1140. 'title': '06_matthew_brender_raj_dutt',
  1141. 'timestamp': 1466638791,
  1142. 'upload_date': '20160622',
  1143. },
  1144. 'add_ie': ['Kaltura'],
  1145. 'expected_warnings': [
  1146. 'Could not send HEAD request'
  1147. ],
  1148. 'params': {
  1149. 'skip_download': True,
  1150. }
  1151. },
  1152. {
  1153. # Kaltura embedded, some fileExt broken (#11480)
  1154. 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
  1155. 'info_dict': {
  1156. 'id': '1_sgtvehim',
  1157. 'ext': 'mp4',
  1158. 'title': 'Our "Standard Models" of particle physics and cosmology',
  1159. 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
  1160. 'timestamp': 1321158993,
  1161. 'upload_date': '20111113',
  1162. 'uploader_id': 'kps1',
  1163. },
  1164. 'add_ie': ['Kaltura'],
  1165. },
  1166. {
  1167. # Kaltura iframe embed
  1168. 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
  1169. 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
  1170. 'info_dict': {
  1171. 'id': '0_f2cfbpwy',
  1172. 'ext': 'mp4',
  1173. 'title': 'I. M. Pei: A Centennial Celebration',
  1174. 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
  1175. 'upload_date': '20170403',
  1176. 'uploader_id': 'batchUser',
  1177. 'timestamp': 1491232186,
  1178. },
  1179. 'add_ie': ['Kaltura'],
  1180. },
  1181. # Eagle.Platform embed (generic URL)
  1182. {
  1183. 'url': 'http://lenta.ru/news/2015/03/06/navalny/',
  1184. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1185. 'info_dict': {
  1186. 'id': '227304',
  1187. 'ext': 'mp4',
  1188. 'title': 'Навальный вышел на свободу',
  1189. 'description': 'md5:d97861ac9ae77377f3f20eaf9d04b4f5',
  1190. 'thumbnail': r're:^https?://.*\.jpg$',
  1191. 'duration': 87,
  1192. 'view_count': int,
  1193. 'age_limit': 0,
  1194. },
  1195. },
  1196. # ClipYou (Eagle.Platform) embed (custom URL)
  1197. {
  1198. 'url': 'http://muz-tv.ru/play/7129/',
  1199. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1200. 'info_dict': {
  1201. 'id': '12820',
  1202. 'ext': 'mp4',
  1203. 'title': "'O Sole Mio",
  1204. 'thumbnail': r're:^https?://.*\.jpg$',
  1205. 'duration': 216,
  1206. 'view_count': int,
  1207. },
  1208. },
  1209. # Pladform embed
  1210. {
  1211. 'url': 'http://muz-tv.ru/kinozal/view/7400/',
  1212. 'info_dict': {
  1213. 'id': '100183293',
  1214. 'ext': 'mp4',
  1215. 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
  1216. 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
  1217. 'thumbnail': r're:^https?://.*\.jpg$',
  1218. 'duration': 694,
  1219. 'age_limit': 0,
  1220. },
  1221. },
  1222. # Playwire embed
  1223. {
  1224. 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
  1225. 'info_dict': {
  1226. 'id': '3519514',
  1227. 'ext': 'mp4',
  1228. 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
  1229. 'thumbnail': r're:^https?://.*\.png$',
  1230. 'duration': 45.115,
  1231. },
  1232. },
  1233. # 5min embed
  1234. {
  1235. 'url': 'http://techcrunch.com/video/facebook-creates-on-this-day-crunch-report/518726732/',
  1236. 'md5': '4c6f127a30736b59b3e2c19234ee2bf7',
  1237. 'info_dict': {
  1238. 'id': '518726732',
  1239. 'ext': 'mp4',
  1240. 'title': 'Facebook Creates "On This Day" | Crunch Report',
  1241. },
  1242. },
  1243. # SVT embed
  1244. {
  1245. 'url': 'http://www.svt.se/sport/ishockey/jagr-tacklar-giroux-under-intervjun',
  1246. 'info_dict': {
  1247. 'id': '2900353',
  1248. 'ext': 'flv',
  1249. 'title': 'Här trycker Jagr till Giroux (under SVT-intervjun)',
  1250. 'duration': 27,
  1251. 'age_limit': 0,
  1252. },
  1253. },
  1254. # Crooks and Liars embed
  1255. {
  1256. 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
  1257. 'info_dict': {
  1258. 'id': '8RUoRhRi',
  1259. 'ext': 'mp4',
  1260. 'title': "Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!",
  1261. 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
  1262. 'timestamp': 1428207000,
  1263. 'upload_date': '20150405',
  1264. 'uploader': 'Heather',
  1265. },
  1266. },
  1267. # Crooks and Liars external embed
  1268. {
  1269. 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
  1270. 'info_dict': {
  1271. 'id': 'MTE3MjUtMzQ2MzA',
  1272. 'ext': 'mp4',
  1273. 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
  1274. 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
  1275. 'timestamp': 1265032391,
  1276. 'upload_date': '20100201',
  1277. 'uploader': 'Heather',
  1278. },
  1279. },
  1280. # NBC Sports vplayer embed
  1281. {
  1282. 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
  1283. 'info_dict': {
  1284. 'id': 'ln7x1qSThw4k',
  1285. 'ext': 'flv',
  1286. 'title': "PFT Live: New leader in the 'new-look' defense",
  1287. 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
  1288. 'uploader': 'NBCU-SPORTS',
  1289. 'upload_date': '20140107',
  1290. 'timestamp': 1389118457,
  1291. },
  1292. },
  1293. # NBC News embed
  1294. {
  1295. 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
  1296. 'md5': '1aa589c675898ae6d37a17913cf68d66',
  1297. 'info_dict': {
  1298. 'id': '701714499682',
  1299. 'ext': 'mp4',
  1300. 'title': 'PREVIEW: On Assignment: David Letterman',
  1301. '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.',
  1302. },
  1303. },
  1304. # UDN embed
  1305. {
  1306. 'url': 'https://video.udn.com/news/300346',
  1307. 'md5': 'fd2060e988c326991037b9aff9df21a6',
  1308. 'info_dict': {
  1309. 'id': '300346',
  1310. 'ext': 'mp4',
  1311. 'title': '中一中男師變性 全校師生力挺',
  1312. 'thumbnail': r're:^https?://.*\.jpg$',
  1313. },
  1314. 'params': {
  1315. # m3u8 download
  1316. 'skip_download': True,
  1317. },
  1318. },
  1319. # Ooyala embed
  1320. {
  1321. 'url': 'http://www.businessinsider.com/excel-index-match-vlookup-video-how-to-2015-2?IR=T',
  1322. 'info_dict': {
  1323. 'id': '50YnY4czr4ms1vJ7yz3xzq0excz_pUMs',
  1324. 'ext': 'mp4',
  1325. 'description': 'VIDEO: INDEX/MATCH versus VLOOKUP.',
  1326. 'title': 'This is what separates the Excel masters from the wannabes',
  1327. 'duration': 191.933,
  1328. },
  1329. 'params': {
  1330. # m3u8 downloads
  1331. 'skip_download': True,
  1332. }
  1333. },
  1334. # Brightcove URL in single quotes
  1335. {
  1336. 'url': 'http://www.sportsnet.ca/baseball/mlb/sn-presents-russell-martin-world-citizen/',
  1337. 'md5': '4ae374f1f8b91c889c4b9203c8c752af',
  1338. 'info_dict': {
  1339. 'id': '4255764656001',
  1340. 'ext': 'mp4',
  1341. 'title': 'SN Presents: Russell Martin, World Citizen',
  1342. '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.',
  1343. 'uploader': 'Rogers Sportsnet',
  1344. 'uploader_id': '1704050871',
  1345. 'upload_date': '20150525',
  1346. 'timestamp': 1432570283,
  1347. },
  1348. },
  1349. # Dailymotion Cloud video
  1350. {
  1351. 'url': 'http://replay.publicsenat.fr/vod/le-debat/florent-kolandjian,dominique-cena,axel-decourtye,laurence-abeille,bruno-parmentier/175910',
  1352. 'md5': 'dcaf23ad0c67a256f4278bce6e0bae38',
  1353. 'info_dict': {
  1354. 'id': 'x2uy8t3',
  1355. 'ext': 'mp4',
  1356. 'title': 'Sauvons les abeilles ! - Le débat',
  1357. 'description': 'md5:d9082128b1c5277987825d684939ca26',
  1358. 'thumbnail': r're:^https?://.*\.jpe?g$',
  1359. 'timestamp': 1434970506,
  1360. 'upload_date': '20150622',
  1361. 'uploader': 'Public Sénat',
  1362. 'uploader_id': 'xa9gza',
  1363. }
  1364. },
  1365. # OnionStudios embed
  1366. {
  1367. 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
  1368. 'info_dict': {
  1369. 'id': '2855',
  1370. 'ext': 'mp4',
  1371. 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
  1372. 'thumbnail': r're:^https?://.*\.jpe?g$',
  1373. 'uploader': 'ClickHole',
  1374. 'uploader_id': 'clickhole',
  1375. }
  1376. },
  1377. # SnagFilms embed
  1378. {
  1379. 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
  1380. 'info_dict': {
  1381. 'id': '74849a00-85a9-11e1-9660-123139220831',
  1382. 'ext': 'mp4',
  1383. 'title': '#whilewewatch',
  1384. }
  1385. },
  1386. # AdobeTVVideo embed
  1387. {
  1388. 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
  1389. 'md5': '43662b577c018ad707a63766462b1e87',
  1390. 'info_dict': {
  1391. 'id': '2456',
  1392. 'ext': 'mp4',
  1393. 'title': 'New experience with Acrobat DC',
  1394. 'description': 'New experience with Acrobat DC',
  1395. 'duration': 248.667,
  1396. },
  1397. },
  1398. # BrightcoveInPageEmbed embed
  1399. {
  1400. 'url': 'http://www.geekandsundry.com/tabletop-bonus-wils-final-thoughts-on-dread/',
  1401. 'info_dict': {
  1402. 'id': '4238694884001',
  1403. 'ext': 'flv',
  1404. 'title': 'Tabletop: Dread, Last Thoughts',
  1405. 'description': 'Tabletop: Dread, Last Thoughts',
  1406. 'duration': 51690,
  1407. },
  1408. },
  1409. # Brightcove embed, with no valid 'renditions' but valid 'IOSRenditions'
  1410. # This video can't be played in browsers if Flash disabled and UA set to iPhone, which is actually a false alarm
  1411. {
  1412. 'url': 'https://dl.dropboxusercontent.com/u/29092637/interview.html',
  1413. 'info_dict': {
  1414. 'id': '4785848093001',
  1415. 'ext': 'mp4',
  1416. 'title': 'The Cardinal Pell Interview',
  1417. 'description': 'Sky News Contributor Andrew Bolt interviews George Pell in Rome, following the Cardinal\'s evidence before the Royal Commission into Child Abuse. ',
  1418. 'uploader': 'GlobeCast Australia - GlobeStream',
  1419. 'uploader_id': '2733773828001',
  1420. 'upload_date': '20160304',
  1421. 'timestamp': 1457083087,
  1422. },
  1423. 'params': {
  1424. # m3u8 downloads
  1425. 'skip_download': True,
  1426. },
  1427. },
  1428. {
  1429. # Brightcove embed with whitespace around attribute names
  1430. 'url': 'http://www.stack.com/video/3167554373001/learn-to-hit-open-three-pointers-with-damian-lillard-s-baseline-drift-drill',
  1431. 'info_dict': {
  1432. 'id': '3167554373001',
  1433. 'ext': 'mp4',
  1434. 'title': "Learn to Hit Open Three-Pointers With Damian Lillard's Baseline Drift Drill",
  1435. 'description': 'md5:57bacb0e0f29349de4972bfda3191713',
  1436. 'uploader_id': '1079349493',
  1437. 'upload_date': '20140207',
  1438. 'timestamp': 1391810548,
  1439. },
  1440. 'params': {
  1441. 'skip_download': True,
  1442. },
  1443. },
  1444. # Another form of arte.tv embed
  1445. {
  1446. 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
  1447. 'md5': '850bfe45417ddf221288c88a0cffe2e2',
  1448. 'info_dict': {
  1449. 'id': '030273-562_PLUS7-F',
  1450. 'ext': 'mp4',
  1451. 'title': 'ARTE Reportage - Nulle part, en France',
  1452. 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
  1453. 'upload_date': '20160409',
  1454. },
  1455. },
  1456. # LiveLeak embed
  1457. {
  1458. 'url': 'http://www.wykop.pl/link/3088787/',
  1459. 'md5': 'ace83b9ed19b21f68e1b50e844fdf95d',
  1460. 'info_dict': {
  1461. 'id': '874_1459135191',
  1462. 'ext': 'mp4',
  1463. 'title': 'Man shows poor quality of new apartment building',
  1464. 'description': 'The wall is like a sand pile.',
  1465. 'uploader': 'Lake8737',
  1466. }
  1467. },
  1468. # Duplicated embedded video URLs
  1469. {
  1470. 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
  1471. 'info_dict': {
  1472. 'id': '149298443_480_16c25b74_2',
  1473. 'ext': 'mp4',
  1474. 'title': 'vs. Blue Orange Spring Game',
  1475. 'uploader': 'www.hudl.com',
  1476. },
  1477. },
  1478. # twitter:player:stream embed
  1479. {
  1480. 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
  1481. 'info_dict': {
  1482. 'id': 'master',
  1483. 'ext': 'mp4',
  1484. 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
  1485. 'uploader': 'www.rtl.be',
  1486. },
  1487. 'params': {
  1488. # m3u8 downloads
  1489. 'skip_download': True,
  1490. },
  1491. },
  1492. # twitter:player embed
  1493. {
  1494. 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
  1495. 'md5': 'a3e0df96369831de324f0778e126653c',
  1496. 'info_dict': {
  1497. 'id': '4909620399001',
  1498. 'ext': 'mp4',
  1499. 'title': 'What Do Black Holes Sound Like?',
  1500. 'description': 'what do black holes sound like',
  1501. 'upload_date': '20160524',
  1502. 'uploader_id': '29913724001',
  1503. 'timestamp': 1464107587,
  1504. 'uploader': 'TheAtlantic',
  1505. },
  1506. 'add_ie': ['BrightcoveLegacy'],
  1507. },
  1508. # Facebook <iframe> embed
  1509. {
  1510. 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
  1511. 'md5': 'fbcde74f534176ecb015849146dd3aee',
  1512. 'info_dict': {
  1513. 'id': '599637780109885',
  1514. 'ext': 'mp4',
  1515. 'title': 'Facebook video #599637780109885',
  1516. },
  1517. },
  1518. # Facebook API embed
  1519. {
  1520. 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
  1521. 'md5': 'a47372ee61b39a7b90287094d447d94e',
  1522. 'info_dict': {
  1523. 'id': '10153467542406923',
  1524. 'ext': 'mp4',
  1525. 'title': 'Facebook video #10153467542406923',
  1526. },
  1527. },
  1528. # Wordpress "YouTube Video Importer" plugin
  1529. {
  1530. 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
  1531. 'md5': 'd16797741b560b485194eddda8121b48',
  1532. 'info_dict': {
  1533. 'id': 'HNTXWDXV9Is',
  1534. 'ext': 'mp4',
  1535. 'title': 'Blue Devils Drumline Stanford lot 2016',
  1536. 'upload_date': '20160627',
  1537. 'uploader_id': 'GENOCIDE8GENERAL10',
  1538. 'uploader': 'cylus cyrus',
  1539. },
  1540. },
  1541. {
  1542. # video stored on custom kaltura server
  1543. 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
  1544. 'md5': '537617d06e64dfed891fa1593c4b30cc',
  1545. 'info_dict': {
  1546. 'id': '0_1iotm5bh',
  1547. 'ext': 'mp4',
  1548. 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
  1549. 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
  1550. 'uploader_id': 'videos.expansion@el-mundo.net',
  1551. 'upload_date': '20150429',
  1552. 'timestamp': 1430303472,
  1553. },
  1554. 'add_ie': ['Kaltura'],
  1555. },
  1556. {
  1557. # Non-standard Vimeo embed
  1558. 'url': 'https://openclassrooms.com/courses/understanding-the-web',
  1559. 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
  1560. 'info_dict': {
  1561. 'id': '148867247',
  1562. 'ext': 'mp4',
  1563. 'title': 'Understanding the web - Teaser',
  1564. 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
  1565. 'upload_date': '20151214',
  1566. 'uploader': 'OpenClassrooms',
  1567. 'uploader_id': 'openclassrooms',
  1568. },
  1569. 'add_ie': ['Vimeo'],
  1570. },
  1571. {
  1572. # generic vimeo embed that requires original URL passed as Referer
  1573. 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
  1574. 'only_matching': True,
  1575. },
  1576. {
  1577. 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
  1578. 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
  1579. 'info_dict': {
  1580. 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
  1581. 'ext': 'mp4',
  1582. 'title': 'Big Buck Bunny',
  1583. 'description': 'Royalty free test video',
  1584. 'timestamp': 1432816365,
  1585. 'upload_date': '20150528',
  1586. 'is_live': False,
  1587. },
  1588. 'params': {
  1589. 'skip_download': True,
  1590. },
  1591. 'add_ie': [ArkenaIE.ie_key()],
  1592. },
  1593. {
  1594. '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/',
  1595. 'info_dict': {
  1596. 'id': '1c7141f46c',
  1597. 'ext': 'mp4',
  1598. 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
  1599. },
  1600. 'params': {
  1601. 'skip_download': True,
  1602. },
  1603. 'add_ie': [Vbox7IE.ie_key()],
  1604. },
  1605. {
  1606. # DBTV embeds
  1607. 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
  1608. 'info_dict': {
  1609. 'id': '43254897',
  1610. 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
  1611. },
  1612. 'playlist_mincount': 3,
  1613. },
  1614. {
  1615. # Videa embeds
  1616. 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
  1617. 'info_dict': {
  1618. 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
  1619. 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
  1620. },
  1621. 'playlist_mincount': 2,
  1622. },
  1623. {
  1624. # 20 minuten embed
  1625. 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
  1626. 'info_dict': {
  1627. 'id': '523629',
  1628. 'ext': 'mp4',
  1629. 'title': 'So kommen Sie bei Eis und Schnee sicher an',
  1630. 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
  1631. },
  1632. 'params': {
  1633. 'skip_download': True,
  1634. },
  1635. 'add_ie': [TwentyMinutenIE.ie_key()],
  1636. },
  1637. {
  1638. # VideoPress embed
  1639. 'url': 'https://en.support.wordpress.com/videopress/',
  1640. 'info_dict': {
  1641. 'id': 'OcobLTqC',
  1642. 'ext': 'm4v',
  1643. 'title': 'IMG_5786',
  1644. 'timestamp': 1435711927,
  1645. 'upload_date': '20150701',
  1646. },
  1647. 'params': {
  1648. 'skip_download': True,
  1649. },
  1650. 'add_ie': [VideoPressIE.ie_key()],
  1651. },
  1652. {
  1653. # Rutube embed
  1654. 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
  1655. 'info_dict': {
  1656. 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
  1657. 'ext': 'flv',
  1658. 'title': 'Магаззино: Казань 2',
  1659. 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
  1660. 'uploader': 'Магаззино',
  1661. 'upload_date': '20170228',
  1662. 'uploader_id': '996642',
  1663. },
  1664. 'params': {
  1665. 'skip_download': True,
  1666. },
  1667. 'add_ie': [RutubeIE.ie_key()],
  1668. },
  1669. {
  1670. # ThePlatform embedded with whitespaces in URLs
  1671. 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
  1672. 'only_matching': True,
  1673. },
  1674. {
  1675. # Senate ISVP iframe https
  1676. 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
  1677. 'md5': 'fb8c70b0b515e5037981a2492099aab8',
  1678. 'info_dict': {
  1679. 'id': 'govtaff020316',
  1680. 'ext': 'mp4',
  1681. 'title': 'Integrated Senate Video Player',
  1682. },
  1683. 'add_ie': [SenateISVPIE.ie_key()],
  1684. },
  1685. {
  1686. # Limelight embeds (1 channel embed + 4 media embeds)
  1687. 'url': 'http://www.sedona.com/FacilitatorTraining2017',
  1688. 'info_dict': {
  1689. 'id': 'FacilitatorTraining2017',
  1690. 'title': 'Facilitator Training 2017',
  1691. },
  1692. 'playlist_mincount': 5,
  1693. },
  1694. {
  1695. 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
  1696. 'info_dict': {
  1697. 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
  1698. 'title': 'Standoff with Walnut Creek murder suspect ends',
  1699. 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
  1700. },
  1701. 'playlist_mincount': 4,
  1702. },
  1703. {
  1704. # WashingtonPost embed
  1705. 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
  1706. 'info_dict': {
  1707. 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
  1708. 'ext': 'mp4',
  1709. 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
  1710. '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.',
  1711. 'timestamp': 1455216756,
  1712. 'uploader': 'The Washington Post',
  1713. 'upload_date': '20160211',
  1714. },
  1715. 'add_ie': [WashingtonPostIE.ie_key()],
  1716. },
  1717. {
  1718. # Mediaset embed
  1719. 'url': 'http://www.tgcom24.mediaset.it/politica/serracchiani-voglio-vivere-in-una-societa-aperta-reazioni-sproporzionate-_3071354-201702a.shtml',
  1720. 'info_dict': {
  1721. 'id': '720642',
  1722. 'ext': 'mp4',
  1723. 'title': 'Serracchiani: "Voglio vivere in una società aperta, con tutela del patto di fiducia"',
  1724. },
  1725. 'params': {
  1726. 'skip_download': True,
  1727. },
  1728. 'add_ie': [MediasetIE.ie_key()],
  1729. },
  1730. # {
  1731. # # TODO: find another test
  1732. # # http://schema.org/VideoObject
  1733. # 'url': 'https://flipagram.com/f/nyvTSJMKId',
  1734. # 'md5': '888dcf08b7ea671381f00fab74692755',
  1735. # 'info_dict': {
  1736. # 'id': 'nyvTSJMKId',
  1737. # 'ext': 'mp4',
  1738. # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
  1739. # 'description': '#love for cats.',
  1740. # 'timestamp': 1461244995,
  1741. # 'upload_date': '20160421',
  1742. # },
  1743. # 'params': {
  1744. # 'force_generic_extractor': True,
  1745. # },
  1746. # }
  1747. ]
  1748. def report_following_redirect(self, new_url):
  1749. """Report information extraction."""
  1750. self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
  1751. def _extract_rss(self, url, video_id, doc):
  1752. playlist_title = doc.find('./channel/title').text
  1753. playlist_desc_el = doc.find('./channel/description')
  1754. playlist_desc = None if playlist_desc_el is None else playlist_desc_el.text
  1755. entries = []
  1756. for it in doc.findall('./channel/item'):
  1757. next_url = xpath_text(it, 'link', fatal=False)
  1758. if not next_url:
  1759. enclosure_nodes = it.findall('./enclosure')
  1760. for e in enclosure_nodes:
  1761. next_url = e.attrib.get('url')
  1762. if next_url:
  1763. break
  1764. if not next_url:
  1765. continue
  1766. entries.append({
  1767. '_type': 'url_transparent',
  1768. 'url': next_url,
  1769. 'title': it.find('title').text,
  1770. })
  1771. return {
  1772. '_type': 'playlist',
  1773. 'id': url,
  1774. 'title': playlist_title,
  1775. 'description': playlist_desc,
  1776. 'entries': entries,
  1777. }
  1778. def _extract_camtasia(self, url, video_id, webpage):
  1779. """ Returns None if no camtasia video can be found. """
  1780. camtasia_cfg = self._search_regex(
  1781. r'fo\.addVariable\(\s*"csConfigFile",\s*"([^"]+)"\s*\);',
  1782. webpage, 'camtasia configuration file', default=None)
  1783. if camtasia_cfg is None:
  1784. return None
  1785. title = self._html_search_meta('DC.title', webpage, fatal=True)
  1786. camtasia_url = compat_urlparse.urljoin(url, camtasia_cfg)
  1787. camtasia_cfg = self._download_xml(
  1788. camtasia_url, video_id,
  1789. note='Downloading camtasia configuration',
  1790. errnote='Failed to download camtasia configuration')
  1791. fileset_node = camtasia_cfg.find('./playlist/array/fileset')
  1792. entries = []
  1793. for n in fileset_node.getchildren():
  1794. url_n = n.find('./uri')
  1795. if url_n is None:
  1796. continue
  1797. entries.append({
  1798. 'id': os.path.splitext(url_n.text.rpartition('/')[2])[0],
  1799. 'title': '%s - %s' % (title, n.tag),
  1800. 'url': compat_urlparse.urljoin(url, url_n.text),
  1801. 'duration': float_or_none(n.find('./duration').text),
  1802. })
  1803. return {
  1804. '_type': 'playlist',
  1805. 'entries': entries,
  1806. 'title': title,
  1807. }
  1808. def _real_extract(self, url):
  1809. if url.startswith('//'):
  1810. return {
  1811. '_type': 'url',
  1812. 'url': self.http_scheme() + url,
  1813. }
  1814. parsed_url = compat_urlparse.urlparse(url)
  1815. if not parsed_url.scheme:
  1816. default_search = self._downloader.params.get('default_search')
  1817. if default_search is None:
  1818. default_search = 'fixup_error'
  1819. if default_search in ('auto', 'auto_warning', 'fixup_error'):
  1820. if '/' in url:
  1821. self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http')
  1822. return self.url_result('http://' + url)
  1823. elif default_search != 'fixup_error':
  1824. if default_search == 'auto_warning':
  1825. if re.match(r'^(?:url|URL)$', url):
  1826. raise ExtractorError(
  1827. 'Invalid URL: %r . Call youtube-dl like this: youtube-dl -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url,
  1828. expected=True)
  1829. else:
  1830. self._downloader.report_warning(
  1831. 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
  1832. return self.url_result('ytsearch:' + url)
  1833. if default_search in ('error', 'fixup_error'):
  1834. raise ExtractorError(
  1835. '%r is not a valid URL. '
  1836. 'Set --default-search "ytsearch" (or run youtube-dl "ytsearch:%s" ) to search YouTube'
  1837. % (url, url), expected=True)
  1838. else:
  1839. if ':' not in default_search:
  1840. default_search += ':'
  1841. return self.url_result(default_search + url)
  1842. url, smuggled_data = unsmuggle_url(url)
  1843. force_videoid = None
  1844. is_intentional = smuggled_data and smuggled_data.get('to_generic')
  1845. if smuggled_data and 'force_videoid' in smuggled_data:
  1846. force_videoid = smuggled_data['force_videoid']
  1847. video_id = force_videoid
  1848. else:
  1849. video_id = self._generic_id(url)
  1850. self.to_screen('%s: Requesting header' % video_id)
  1851. head_req = HEADRequest(url)
  1852. head_response = self._request_webpage(
  1853. head_req, video_id,
  1854. note=False, errnote='Could not send HEAD request to %s' % url,
  1855. fatal=False)
  1856. if head_response is not False:
  1857. # Check for redirect
  1858. new_url = head_response.geturl()
  1859. if url != new_url:
  1860. self.report_following_redirect(new_url)
  1861. if force_videoid:
  1862. new_url = smuggle_url(
  1863. new_url, {'force_videoid': force_videoid})
  1864. return self.url_result(new_url)
  1865. full_response = None
  1866. if head_response is False:
  1867. request = sanitized_Request(url)
  1868. request.add_header('Accept-Encoding', '*')
  1869. full_response = self._request_webpage(request, video_id)
  1870. head_response = full_response
  1871. info_dict = {
  1872. 'id': video_id,
  1873. 'title': self._generic_title(url),
  1874. 'upload_date': unified_strdate(head_response.headers.get('Last-Modified'))
  1875. }
  1876. # Check for direct link to a video
  1877. content_type = head_response.headers.get('Content-Type', '').lower()
  1878. m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
  1879. if m:
  1880. format_id = m.group('format_id')
  1881. if format_id.endswith('mpegurl'):
  1882. formats = self._extract_m3u8_formats(url, video_id, 'mp4')
  1883. elif format_id == 'f4m':
  1884. formats = self._extract_f4m_formats(url, video_id)
  1885. else:
  1886. formats = [{
  1887. 'format_id': m.group('format_id'),
  1888. 'url': url,
  1889. 'vcodec': 'none' if m.group('type') == 'audio' else None
  1890. }]
  1891. info_dict['direct'] = True
  1892. self._sort_formats(formats)
  1893. info_dict['formats'] = formats
  1894. return info_dict
  1895. if not self._downloader.params.get('test', False) and not is_intentional:
  1896. force = self._downloader.params.get('force_generic_extractor', False)
  1897. self._downloader.report_warning(
  1898. '%s on generic information extractor.' % ('Forcing' if force else 'Falling back'))
  1899. if not full_response:
  1900. request = sanitized_Request(url)
  1901. # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
  1902. # making it impossible to download only chunk of the file (yet we need only 512kB to
  1903. # test whether it's HTML or not). According to youtube-dl default Accept-Encoding
  1904. # that will always result in downloading the whole file that is not desirable.
  1905. # Therefore for extraction pass we have to override Accept-Encoding to any in order
  1906. # to accept raw bytes and being able to download only a chunk.
  1907. # It may probably better to solve this by checking Content-Type for application/octet-stream
  1908. # after HEAD request finishes, but not sure if we can rely on this.
  1909. request.add_header('Accept-Encoding', '*')
  1910. full_response = self._request_webpage(request, video_id)
  1911. first_bytes = full_response.read(512)
  1912. # Is it an M3U playlist?
  1913. if first_bytes.startswith(b'#EXTM3U'):
  1914. info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4')
  1915. self._sort_formats(info_dict['formats'])
  1916. return info_dict
  1917. # Maybe it's a direct link to a video?
  1918. # Be careful not to download the whole thing!
  1919. if not is_html(first_bytes):
  1920. self._downloader.report_warning(
  1921. 'URL could be a direct video link, returning it as such.')
  1922. info_dict.update({
  1923. 'direct': True,
  1924. 'url': url,
  1925. })
  1926. return info_dict
  1927. webpage = self._webpage_read_content(
  1928. full_response, url, video_id, prefix=first_bytes)
  1929. self.report_extraction(video_id)
  1930. # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
  1931. try:
  1932. doc = compat_etree_fromstring(webpage.encode('utf-8'))
  1933. if doc.tag == 'rss':
  1934. return self._extract_rss(url, video_id, doc)
  1935. elif doc.tag == 'SmoothStreamingMedia':
  1936. info_dict['formats'] = self._parse_ism_formats(doc, url)
  1937. self._sort_formats(info_dict['formats'])
  1938. return info_dict
  1939. elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
  1940. smil = self._parse_smil(doc, url, video_id)
  1941. self._sort_formats(smil['formats'])
  1942. return smil
  1943. elif doc.tag == '{http://xspf.org/ns/0/}playlist':
  1944. return self.playlist_result(self._parse_xspf(doc, video_id), video_id)
  1945. elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
  1946. info_dict['formats'] = self._parse_mpd_formats(
  1947. doc, video_id,
  1948. mpd_base_url=full_response.geturl().rpartition('/')[0],
  1949. mpd_url=url)
  1950. self._sort_formats(info_dict['formats'])
  1951. return info_dict
  1952. elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
  1953. info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
  1954. self._sort_formats(info_dict['formats'])
  1955. return info_dict
  1956. except compat_xml_parse_error:
  1957. pass
  1958. # Is it a Camtasia project?
  1959. camtasia_res = self._extract_camtasia(url, video_id, webpage)
  1960. if camtasia_res is not None:
  1961. return camtasia_res
  1962. # Sometimes embedded video player is hidden behind percent encoding
  1963. # (e.g. https://github.com/rg3/youtube-dl/issues/2448)
  1964. # Unescaping the whole page allows to handle those cases in a generic way
  1965. webpage = compat_urllib_parse_unquote(webpage)
  1966. # it's tempting to parse this further, but you would
  1967. # have to take into account all the variations like
  1968. # Video Title - Site Name
  1969. # Site Name | Video Title
  1970. # Video Title - Tagline | Site Name
  1971. # and so on and so forth; it's just not practical
  1972. video_title = self._og_search_title(
  1973. webpage, default=None) or self._html_search_regex(
  1974. r'(?s)<title>(.*?)</title>', webpage, 'video title',
  1975. default='video')
  1976. # Try to detect age limit automatically
  1977. age_limit = self._rta_search(webpage)
  1978. # And then there are the jokers who advertise that they use RTA,
  1979. # but actually don't.
  1980. AGE_LIMIT_MARKERS = [
  1981. r'Proudly Labeled <a href="http://www.rtalabel.org/" title="Restricted to Adults">RTA</a>',
  1982. ]
  1983. if any(re.search(marker, webpage) for marker in AGE_LIMIT_MARKERS):
  1984. age_limit = 18
  1985. # video uploader is domain name
  1986. video_uploader = self._search_regex(
  1987. r'^(?:https?://)?([^/]*)/.*', url, 'video uploader')
  1988. video_description = self._og_search_description(webpage, default=None)
  1989. video_thumbnail = self._og_search_thumbnail(webpage, default=None)
  1990. # Look for Brightcove Legacy Studio embeds
  1991. bc_urls = BrightcoveLegacyIE._extract_brightcove_urls(webpage)
  1992. if bc_urls:
  1993. entries = [{
  1994. '_type': 'url',
  1995. 'url': smuggle_url(bc_url, {'Referer': url}),
  1996. 'ie_key': 'BrightcoveLegacy'
  1997. } for bc_url in bc_urls]
  1998. return {
  1999. '_type': 'playlist',
  2000. 'title': video_title,
  2001. 'id': video_id,
  2002. 'entries': entries,
  2003. }
  2004. # Look for Brightcove New Studio embeds
  2005. bc_urls = BrightcoveNewIE._extract_urls(self, webpage)
  2006. if bc_urls:
  2007. return self.playlist_from_matches(bc_urls, video_id, video_title, ie='BrightcoveNew')
  2008. # Look for ThePlatform embeds
  2009. tp_urls = ThePlatformIE._extract_urls(webpage)
  2010. if tp_urls:
  2011. return self.playlist_from_matches(tp_urls, video_id, video_title, ie='ThePlatform')
  2012. # Look for Vessel embeds
  2013. vessel_urls = VesselIE._extract_urls(webpage)
  2014. if vessel_urls:
  2015. return self.playlist_from_matches(vessel_urls, video_id, video_title, ie=VesselIE.ie_key())
  2016. # Look for embedded rtl.nl player
  2017. matches = re.findall(
  2018. r'<iframe[^>]+?src="((?:https?:)?//(?:www\.)?rtl\.nl/system/videoplayer/[^"]+(?:video_)?embed[^"]+)"',
  2019. webpage)
  2020. if matches:
  2021. return self.playlist_from_matches(matches, video_id, video_title, ie='RtlNl')
  2022. vimeo_urls = VimeoIE._extract_urls(url, webpage)
  2023. if vimeo_urls:
  2024. return self.playlist_from_matches(vimeo_urls, video_id, video_title, ie=VimeoIE.ie_key())
  2025. vid_me_embed_url = self._search_regex(
  2026. r'src=[\'"](https?://vid\.me/[^\'"]+)[\'"]',
  2027. webpage, 'vid.me embed', default=None)
  2028. if vid_me_embed_url is not None:
  2029. return self.url_result(vid_me_embed_url, 'Vidme')
  2030. # Look for embedded YouTube player
  2031. matches = re.findall(r'''(?x)
  2032. (?:
  2033. <iframe[^>]+?src=|
  2034. data-video-url=|
  2035. <embed[^>]+?src=|
  2036. embedSWF\(?:\s*|
  2037. <object[^>]+data=|
  2038. new\s+SWFObject\(
  2039. )
  2040. (["\'])
  2041. (?P<url>(?:https?:)?//(?:www\.)?youtube(?:-nocookie)?\.com/
  2042. (?:embed|v|p)/.+?)
  2043. \1''', webpage)
  2044. if matches:
  2045. return self.playlist_from_matches(
  2046. matches, video_id, video_title, lambda m: unescapeHTML(m[1]))
  2047. # Look for lazyYT YouTube embed
  2048. matches = re.findall(
  2049. r'class="lazyYT" data-youtube-id="([^"]+)"', webpage)
  2050. if matches:
  2051. return self.playlist_from_matches(matches, video_id, video_title, lambda m: unescapeHTML(m))
  2052. # Look for Wordpress "YouTube Video Importer" plugin
  2053. matches = re.findall(r'''(?x)<div[^>]+
  2054. class=(?P<q1>[\'"])[^\'"]*\byvii_single_video_player\b[^\'"]*(?P=q1)[^>]+
  2055. data-video_id=(?P<q2>[\'"])([^\'"]+)(?P=q2)''', webpage)
  2056. if matches:
  2057. return self.playlist_from_matches(matches, video_id, video_title, lambda m: m[-1])
  2058. matches = DailymotionIE._extract_urls(webpage)
  2059. if matches:
  2060. return self.playlist_from_matches(matches, video_id, video_title)
  2061. # Look for embedded Dailymotion playlist player (#3822)
  2062. m = re.search(
  2063. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.[a-z]{2,3}/widget/jukebox\?.+?)\1', webpage)
  2064. if m:
  2065. playlists = re.findall(
  2066. r'list\[\]=/playlist/([^/]+)/', unescapeHTML(m.group('url')))
  2067. if playlists:
  2068. return self.playlist_from_matches(
  2069. playlists, video_id, video_title, lambda p: '//dailymotion.com/playlist/%s' % p)
  2070. # Look for embedded Wistia player
  2071. wistia_url = WistiaIE._extract_url(webpage)
  2072. if wistia_url:
  2073. return {
  2074. '_type': 'url_transparent',
  2075. 'url': self._proto_relative_url(wistia_url),
  2076. 'ie_key': WistiaIE.ie_key(),
  2077. 'uploader': video_uploader,
  2078. }
  2079. # Look for SVT player
  2080. svt_url = SVTIE._extract_url(webpage)
  2081. if svt_url:
  2082. return self.url_result(svt_url, 'SVT')
  2083. # Look for Bandcamp pages with custom domain
  2084. mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
  2085. if mobj is not None:
  2086. burl = unescapeHTML(mobj.group(1))
  2087. # Don't set the extractor because it can be a track url or an album
  2088. return self.url_result(burl)
  2089. # Look for embedded Vevo player
  2090. mobj = re.search(
  2091. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:cache\.)?vevo\.com/.+?)\1', webpage)
  2092. if mobj is not None:
  2093. return self.url_result(mobj.group('url'))
  2094. # Look for embedded Viddler player
  2095. mobj = re.search(
  2096. r'<(?:iframe[^>]+?src|param[^>]+?value)=(["\'])(?P<url>(?:https?:)?//(?:www\.)?viddler\.com/(?:embed|player)/.+?)\1',
  2097. webpage)
  2098. if mobj is not None:
  2099. return self.url_result(mobj.group('url'))
  2100. # Look for NYTimes player
  2101. mobj = re.search(
  2102. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//graphics8\.nytimes\.com/bcvideo/[^/]+/iframe/embed\.html.+?)\1>',
  2103. webpage)
  2104. if mobj is not None:
  2105. return self.url_result(mobj.group('url'))
  2106. # Look for Libsyn player
  2107. mobj = re.search(
  2108. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//html5-player\.libsyn\.com/embed/.+?)\1', webpage)
  2109. if mobj is not None:
  2110. return self.url_result(mobj.group('url'))
  2111. # Look for Ooyala videos
  2112. mobj = (re.search(r'player\.ooyala\.com/[^"?]+[?#][^"]*?(?:embedCode|ec)=(?P<ec>[^"&]+)', webpage) or
  2113. re.search(r'OO\.Player\.create\([\'"].*?[\'"],\s*[\'"](?P<ec>.{32})[\'"]', webpage) or
  2114. re.search(r'SBN\.VideoLinkset\.ooyala\([\'"](?P<ec>.{32})[\'"]\)', webpage) or
  2115. re.search(r'data-ooyala-video-id\s*=\s*[\'"](?P<ec>.{32})[\'"]', webpage))
  2116. if mobj is not None:
  2117. embed_token = self._search_regex(
  2118. r'embedToken[\'"]?\s*:\s*[\'"]([^\'"]+)',
  2119. webpage, 'ooyala embed token', default=None)
  2120. return OoyalaIE._build_url_result(smuggle_url(
  2121. mobj.group('ec'), {
  2122. 'domain': url,
  2123. 'embed_token': embed_token,
  2124. }))
  2125. # Look for multiple Ooyala embeds on SBN network websites
  2126. mobj = re.search(r'SBN\.VideoLinkset\.entryGroup\((\[.*?\])', webpage)
  2127. if mobj is not None:
  2128. embeds = self._parse_json(mobj.group(1), video_id, fatal=False)
  2129. if embeds:
  2130. return self.playlist_from_matches(
  2131. embeds, video_id, video_title,
  2132. getter=lambda v: OoyalaIE._url_for_embed_code(smuggle_url(v['provider_video_id'], {'domain': url})), ie='Ooyala')
  2133. # Look for Aparat videos
  2134. mobj = re.search(r'<iframe .*?src="(http://www\.aparat\.com/video/[^"]+)"', webpage)
  2135. if mobj is not None:
  2136. return self.url_result(mobj.group(1), 'Aparat')
  2137. # Look for MPORA videos
  2138. mobj = re.search(r'<iframe .*?src="(http://mpora\.(?:com|de)/videos/[^"]+)"', webpage)
  2139. if mobj is not None:
  2140. return self.url_result(mobj.group(1), 'Mpora')
  2141. # Look for embedded NovaMov-based player
  2142. mobj = re.search(
  2143. r'''(?x)<(?:pagespeed_)?iframe[^>]+?src=(["\'])
  2144. (?P<url>http://(?:(?:embed|www)\.)?
  2145. (?:novamov\.com|
  2146. nowvideo\.(?:ch|sx|eu|at|ag|co)|
  2147. videoweed\.(?:es|com)|
  2148. movshare\.(?:net|sx|ag)|
  2149. divxstage\.(?:eu|net|ch|co|at|ag))
  2150. /embed\.php.+?)\1''', webpage)
  2151. if mobj is not None:
  2152. return self.url_result(mobj.group('url'))
  2153. # Look for embedded Facebook player
  2154. facebook_url = FacebookIE._extract_url(webpage)
  2155. if facebook_url is not None:
  2156. return self.url_result(facebook_url, 'Facebook')
  2157. # Look for embedded VK player
  2158. mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk\.com/video_ext\.php.+?)\1', webpage)
  2159. if mobj is not None:
  2160. return self.url_result(mobj.group('url'), 'VK')
  2161. # Look for embedded Odnoklassniki player
  2162. mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:odnoklassniki|ok)\.ru/videoembed/.+?)\1', webpage)
  2163. if mobj is not None:
  2164. return self.url_result(mobj.group('url'), 'Odnoklassniki')
  2165. # Look for embedded ivi player
  2166. mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
  2167. if mobj is not None:
  2168. return self.url_result(mobj.group('url'), 'Ivi')
  2169. # Look for embedded Huffington Post player
  2170. mobj = re.search(
  2171. r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)
  2172. if mobj is not None:
  2173. return self.url_result(mobj.group('url'), 'HuffPost')
  2174. # Look for embed.ly
  2175. mobj = re.search(r'class=["\']embedly-card["\'][^>]href=["\'](?P<url>[^"\']+)', webpage)
  2176. if mobj is not None:
  2177. return self.url_result(mobj.group('url'))
  2178. mobj = re.search(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', webpage)
  2179. if mobj is not None:
  2180. return self.url_result(compat_urllib_parse_unquote(mobj.group('url')))
  2181. # Look for funnyordie embed
  2182. matches = re.findall(r'<iframe[^>]+?src="(https?://(?:www\.)?funnyordie\.com/embed/[^"]+)"', webpage)
  2183. if matches:
  2184. return self.playlist_from_matches(
  2185. matches, video_id, video_title, getter=unescapeHTML, ie='FunnyOrDie')
  2186. # Look for BBC iPlayer embed
  2187. matches = re.findall(r'setPlaylist\("(https?://www\.bbc\.co\.uk/iplayer/[^/]+/[\da-z]{8})"\)', webpage)
  2188. if matches:
  2189. return self.playlist_from_matches(matches, video_id, video_title, ie='BBCCoUk')
  2190. # Look for embedded RUTV player
  2191. rutv_url = RUTVIE._extract_url(webpage)
  2192. if rutv_url:
  2193. return self.url_result(rutv_url, 'RUTV')
  2194. # Look for embedded TVC player
  2195. tvc_url = TVCIE._extract_url(webpage)
  2196. if tvc_url:
  2197. return self.url_result(tvc_url, 'TVC')
  2198. # Look for embedded SportBox player
  2199. sportbox_urls = SportBoxEmbedIE._extract_urls(webpage)
  2200. if sportbox_urls:
  2201. return self.playlist_from_matches(sportbox_urls, video_id, video_title, ie='SportBoxEmbed')
  2202. # Look for embedded XHamster player
  2203. xhamster_urls = XHamsterEmbedIE._extract_urls(webpage)
  2204. if xhamster_urls:
  2205. return self.playlist_from_matches(xhamster_urls, video_id, video_title, ie='XHamsterEmbed')
  2206. # Look for embedded TNAFlixNetwork player
  2207. tnaflix_urls = TNAFlixNetworkEmbedIE._extract_urls(webpage)
  2208. if tnaflix_urls:
  2209. return self.playlist_from_matches(tnaflix_urls, video_id, video_title, ie=TNAFlixNetworkEmbedIE.ie_key())
  2210. # Look for embedded PornHub player
  2211. pornhub_urls = PornHubIE._extract_urls(webpage)
  2212. if pornhub_urls:
  2213. return self.playlist_from_matches(pornhub_urls, video_id, video_title, ie=PornHubIE.ie_key())
  2214. # Look for embedded DrTuber player
  2215. drtuber_urls = DrTuberIE._extract_urls(webpage)
  2216. if drtuber_urls:
  2217. return self.playlist_from_matches(drtuber_urls, video_id, video_title, ie=DrTuberIE.ie_key())
  2218. # Look for embedded RedTube player
  2219. redtube_urls = RedTubeIE._extract_urls(webpage)
  2220. if redtube_urls:
  2221. return self.playlist_from_matches(redtube_urls, video_id, video_title, ie=RedTubeIE.ie_key())
  2222. # Look for embedded Tvigle player
  2223. mobj = re.search(
  2224. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//cloud\.tvigle\.ru/video/.+?)\1', webpage)
  2225. if mobj is not None:
  2226. return self.url_result(mobj.group('url'), 'Tvigle')
  2227. # Look for embedded TED player
  2228. mobj = re.search(
  2229. r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)
  2230. if mobj is not None:
  2231. return self.url_result(mobj.group('url'), 'TED')
  2232. # Look for embedded Ustream videos
  2233. ustream_url = UstreamIE._extract_url(webpage)
  2234. if ustream_url:
  2235. return self.url_result(ustream_url, UstreamIE.ie_key())
  2236. # Look for embedded arte.tv player
  2237. mobj = re.search(
  2238. r'<(?:script|iframe) [^>]*?src="(?P<url>http://www\.arte\.tv/(?:playerv2/embed|arte_vp/index)[^"]+)"',
  2239. webpage)
  2240. if mobj is not None:
  2241. return self.url_result(mobj.group('url'), 'ArteTVEmbed')
  2242. # Look for embedded francetv player
  2243. mobj = re.search(
  2244. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?://)?embed\.francetv\.fr/\?ue=.+?)\1',
  2245. webpage)
  2246. if mobj is not None:
  2247. return self.url_result(mobj.group('url'))
  2248. # Look for embedded smotri.com player
  2249. smotri_url = SmotriIE._extract_url(webpage)
  2250. if smotri_url:
  2251. return self.url_result(smotri_url, 'Smotri')
  2252. # Look for embedded Myvi.ru player
  2253. myvi_url = MyviIE._extract_url(webpage)
  2254. if myvi_url:
  2255. return self.url_result(myvi_url)
  2256. # Look for embedded soundcloud player
  2257. soundcloud_urls = SoundcloudIE._extract_urls(webpage)
  2258. if soundcloud_urls:
  2259. return self.playlist_from_matches(soundcloud_urls, video_id, video_title, getter=unescapeHTML, ie=SoundcloudIE.ie_key())
  2260. # Look for tunein player
  2261. tunein_urls = TuneInBaseIE._extract_urls(webpage)
  2262. if tunein_urls:
  2263. return self.playlist_from_matches(tunein_urls, video_id, video_title)
  2264. # Look for embedded mtvservices player
  2265. mtvservices_url = MTVServicesEmbeddedIE._extract_url(webpage)
  2266. if mtvservices_url:
  2267. return self.url_result(mtvservices_url, ie='MTVServicesEmbedded')
  2268. # Look for embedded yahoo player
  2269. mobj = re.search(
  2270. r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:screen|movies)\.yahoo\.com/.+?\.html\?format=embed)\1',
  2271. webpage)
  2272. if mobj is not None:
  2273. return self.url_result(mobj.group('url'), 'Yahoo')
  2274. # Look for embedded sbs.com.au player
  2275. mobj = re.search(
  2276. r'''(?x)
  2277. (?:
  2278. <meta\s+property="og:video"\s+content=|
  2279. <iframe[^>]+?src=
  2280. )
  2281. (["\'])(?P<url>https?://(?:www\.)?sbs\.com\.au/ondemand/video/.+?)\1''',
  2282. webpage)
  2283. if mobj is not None:
  2284. return self.url_result(mobj.group('url'), 'SBS')
  2285. # Look for embedded Cinchcast player
  2286. mobj = re.search(
  2287. r'<iframe[^>]+?src=(["\'])(?P<url>https?://player\.cinchcast\.com/.+?)\1',
  2288. webpage)
  2289. if mobj is not None:
  2290. return self.url_result(mobj.group('url'), 'Cinchcast')
  2291. mobj = re.search(
  2292. r'<iframe[^>]+?src=(["\'])(?P<url>https?://m(?:lb)?\.mlb\.com/shared/video/embed/embed\.html\?.+?)\1',
  2293. webpage)
  2294. if not mobj:
  2295. mobj = re.search(
  2296. r'data-video-link=["\'](?P<url>http://m.mlb.com/video/[^"\']+)',
  2297. webpage)
  2298. if mobj is not None:
  2299. return self.url_result(mobj.group('url'), 'MLB')
  2300. mobj = re.search(
  2301. r'<(?:iframe|script)[^>]+?src=(["\'])(?P<url>%s)\1' % CondeNastIE.EMBED_URL,
  2302. webpage)
  2303. if mobj is not None:
  2304. return self.url_result(self._proto_relative_url(mobj.group('url'), scheme='http:'), 'CondeNast')
  2305. mobj = re.search(
  2306. r'<iframe[^>]+src="(?P<url>https?://(?:new\.)?livestream\.com/[^"]+/player[^"]+)"',
  2307. webpage)
  2308. if mobj is not None:
  2309. return self.url_result(mobj.group('url'), 'Livestream')
  2310. # Look for Zapiks embed
  2311. mobj = re.search(
  2312. r'<iframe[^>]+src="(?P<url>https?://(?:www\.)?zapiks\.fr/index\.php\?.+?)"', webpage)
  2313. if mobj is not None:
  2314. return self.url_result(mobj.group('url'), 'Zapiks')
  2315. # Look for Kaltura embeds
  2316. kaltura_url = KalturaIE._extract_url(webpage)
  2317. if kaltura_url:
  2318. return self.url_result(smuggle_url(kaltura_url, {'source_url': url}), KalturaIE.ie_key())
  2319. # Look for Eagle.Platform embeds
  2320. eagleplatform_url = EaglePlatformIE._extract_url(webpage)
  2321. if eagleplatform_url:
  2322. return self.url_result(eagleplatform_url, EaglePlatformIE.ie_key())
  2323. # Look for ClipYou (uses Eagle.Platform) embeds
  2324. mobj = re.search(
  2325. r'<iframe[^>]+src="https?://(?P<host>media\.clipyou\.ru)/index/player\?.*\brecord_id=(?P<id>\d+).*"', webpage)
  2326. if mobj is not None:
  2327. return self.url_result('eagleplatform:%(host)s:%(id)s' % mobj.groupdict(), 'EaglePlatform')
  2328. # Look for Pladform embeds
  2329. pladform_url = PladformIE._extract_url(webpage)
  2330. if pladform_url:
  2331. return self.url_result(pladform_url)
  2332. # Look for Videomore embeds
  2333. videomore_url = VideomoreIE._extract_url(webpage)
  2334. if videomore_url:
  2335. return self.url_result(videomore_url)
  2336. # Look for Webcaster embeds
  2337. webcaster_url = WebcasterFeedIE._extract_url(self, webpage)
  2338. if webcaster_url:
  2339. return self.url_result(webcaster_url, ie=WebcasterFeedIE.ie_key())
  2340. # Look for Playwire embeds
  2341. mobj = re.search(
  2342. r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
  2343. if mobj is not None:
  2344. return self.url_result(mobj.group('url'))
  2345. # Look for 5min embeds
  2346. mobj = re.search(
  2347. r'<meta[^>]+property="og:video"[^>]+content="https?://embed\.5min\.com/(?P<id>[0-9]+)/?', webpage)
  2348. if mobj is not None:
  2349. return self.url_result('5min:%s' % mobj.group('id'), 'FiveMin')
  2350. # Look for Crooks and Liars embeds
  2351. mobj = re.search(
  2352. r'<(?:iframe[^>]+src|param[^>]+value)=(["\'])(?P<url>(?:https?:)?//embed\.crooksandliars\.com/(?:embed|v)/.+?)\1', webpage)
  2353. if mobj is not None:
  2354. return self.url_result(mobj.group('url'))
  2355. # Look for NBC Sports VPlayer embeds
  2356. nbc_sports_url = NBCSportsVPlayerIE._extract_url(webpage)
  2357. if nbc_sports_url:
  2358. return self.url_result(nbc_sports_url, 'NBCSportsVPlayer')
  2359. # Look for NBC News embeds
  2360. nbc_news_embed_url = re.search(
  2361. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//www\.nbcnews\.com/widget/video-embed/[^"\']+)\1', webpage)
  2362. if nbc_news_embed_url:
  2363. return self.url_result(nbc_news_embed_url.group('url'), 'NBCNews')
  2364. # Look for Google Drive embeds
  2365. google_drive_url = GoogleDriveIE._extract_url(webpage)
  2366. if google_drive_url:
  2367. return self.url_result(google_drive_url, 'GoogleDrive')
  2368. # Look for UDN embeds
  2369. mobj = re.search(
  2370. r'<iframe[^>]+src="(?P<url>%s)"' % UDNEmbedIE._PROTOCOL_RELATIVE_VALID_URL, webpage)
  2371. if mobj is not None:
  2372. return self.url_result(
  2373. compat_urlparse.urljoin(url, mobj.group('url')), 'UDNEmbed')
  2374. # Look for Senate ISVP iframe
  2375. senate_isvp_url = SenateISVPIE._search_iframe_url(webpage)
  2376. if senate_isvp_url:
  2377. return self.url_result(senate_isvp_url, 'SenateISVP')
  2378. # Look for Dailymotion Cloud videos
  2379. dmcloud_url = DailymotionCloudIE._extract_dmcloud_url(webpage)
  2380. if dmcloud_url:
  2381. return self.url_result(dmcloud_url, 'DailymotionCloud')
  2382. # Look for OnionStudios embeds
  2383. onionstudios_url = OnionStudiosIE._extract_url(webpage)
  2384. if onionstudios_url:
  2385. return self.url_result(onionstudios_url)
  2386. # Look for ViewLift embeds
  2387. viewlift_url = ViewLiftEmbedIE._extract_url(webpage)
  2388. if viewlift_url:
  2389. return self.url_result(viewlift_url)
  2390. # Look for JWPlatform embeds
  2391. jwplatform_url = JWPlatformIE._extract_url(webpage)
  2392. if jwplatform_url:
  2393. return self.url_result(jwplatform_url, 'JWPlatform')
  2394. # Look for Digiteka embeds
  2395. digiteka_url = DigitekaIE._extract_url(webpage)
  2396. if digiteka_url:
  2397. return self.url_result(self._proto_relative_url(digiteka_url), DigitekaIE.ie_key())
  2398. # Look for Arkena embeds
  2399. arkena_url = ArkenaIE._extract_url(webpage)
  2400. if arkena_url:
  2401. return self.url_result(arkena_url, ArkenaIE.ie_key())
  2402. # Look for Piksel embeds
  2403. piksel_url = PikselIE._extract_url(webpage)
  2404. if piksel_url:
  2405. return self.url_result(piksel_url, PikselIE.ie_key())
  2406. # Look for Limelight embeds
  2407. limelight_urls = LimelightBaseIE._extract_urls(webpage, url)
  2408. if limelight_urls:
  2409. return self.playlist_result(
  2410. limelight_urls, video_id, video_title, video_description)
  2411. # Look for Anvato embeds
  2412. anvato_urls = AnvatoIE._extract_urls(self, webpage, video_id)
  2413. if anvato_urls:
  2414. return self.playlist_result(
  2415. anvato_urls, video_id, video_title, video_description)
  2416. # Look for AdobeTVVideo embeds
  2417. mobj = re.search(
  2418. r'<iframe[^>]+src=[\'"]((?:https?:)?//video\.tv\.adobe\.com/v/\d+[^"]+)[\'"]',
  2419. webpage)
  2420. if mobj is not None:
  2421. return self.url_result(
  2422. self._proto_relative_url(unescapeHTML(mobj.group(1))),
  2423. 'AdobeTVVideo')
  2424. # Look for Vine embeds
  2425. mobj = re.search(
  2426. r'<iframe[^>]+src=[\'"]((?:https?:)?//(?:www\.)?vine\.co/v/[^/]+/embed/(?:simple|postcard))',
  2427. webpage)
  2428. if mobj is not None:
  2429. return self.url_result(
  2430. self._proto_relative_url(unescapeHTML(mobj.group(1))), 'Vine')
  2431. # Look for VODPlatform embeds
  2432. mobj = re.search(
  2433. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vod-platform\.net/[eE]mbed/.+?)\1',
  2434. webpage)
  2435. if mobj is not None:
  2436. return self.url_result(
  2437. self._proto_relative_url(unescapeHTML(mobj.group('url'))), 'VODPlatform')
  2438. # Look for Mangomolo embeds
  2439. mobj = re.search(
  2440. r'''(?x)<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?admin\.mangomolo\.com/analytics/index\.php/customers/embed/
  2441. (?:
  2442. video\?.*?\bid=(?P<video_id>\d+)|
  2443. index\?.*?\bchannelid=(?P<channel_id>(?:[A-Za-z0-9+/=]|%2B|%2F|%3D)+)
  2444. ).+?)\1''', webpage)
  2445. if mobj is not None:
  2446. info = {
  2447. '_type': 'url_transparent',
  2448. 'url': self._proto_relative_url(unescapeHTML(mobj.group('url'))),
  2449. 'title': video_title,
  2450. 'description': video_description,
  2451. 'thumbnail': video_thumbnail,
  2452. 'uploader': video_uploader,
  2453. }
  2454. video_id = mobj.group('video_id')
  2455. if video_id:
  2456. info.update({
  2457. 'ie_key': 'MangomoloVideo',
  2458. 'id': video_id,
  2459. })
  2460. else:
  2461. info.update({
  2462. 'ie_key': 'MangomoloLive',
  2463. 'id': mobj.group('channel_id'),
  2464. })
  2465. return info
  2466. # Look for Instagram embeds
  2467. instagram_embed_url = InstagramIE._extract_embed_url(webpage)
  2468. if instagram_embed_url is not None:
  2469. return self.url_result(
  2470. self._proto_relative_url(instagram_embed_url), InstagramIE.ie_key())
  2471. # Look for LiveLeak embeds
  2472. liveleak_url = LiveLeakIE._extract_url(webpage)
  2473. if liveleak_url:
  2474. return self.url_result(liveleak_url, 'LiveLeak')
  2475. # Look for 3Q SDN embeds
  2476. threeqsdn_url = ThreeQSDNIE._extract_url(webpage)
  2477. if threeqsdn_url:
  2478. return {
  2479. '_type': 'url_transparent',
  2480. 'ie_key': ThreeQSDNIE.ie_key(),
  2481. 'url': self._proto_relative_url(threeqsdn_url),
  2482. 'title': video_title,
  2483. 'description': video_description,
  2484. 'thumbnail': video_thumbnail,
  2485. 'uploader': video_uploader,
  2486. }
  2487. # Look for VBOX7 embeds
  2488. vbox7_url = Vbox7IE._extract_url(webpage)
  2489. if vbox7_url:
  2490. return self.url_result(vbox7_url, Vbox7IE.ie_key())
  2491. # Look for DBTV embeds
  2492. dbtv_urls = DBTVIE._extract_urls(webpage)
  2493. if dbtv_urls:
  2494. return self.playlist_from_matches(dbtv_urls, video_id, video_title, ie=DBTVIE.ie_key())
  2495. # Look for Videa embeds
  2496. videa_urls = VideaIE._extract_urls(webpage)
  2497. if videa_urls:
  2498. return self.playlist_from_matches(videa_urls, video_id, video_title, ie=VideaIE.ie_key())
  2499. # Look for 20 minuten embeds
  2500. twentymin_urls = TwentyMinutenIE._extract_urls(webpage)
  2501. if twentymin_urls:
  2502. return self.playlist_from_matches(
  2503. twentymin_urls, video_id, video_title, ie=TwentyMinutenIE.ie_key())
  2504. # Look for Openload embeds
  2505. openload_urls = OpenloadIE._extract_urls(webpage)
  2506. if openload_urls:
  2507. return self.playlist_from_matches(
  2508. openload_urls, video_id, video_title, ie=OpenloadIE.ie_key())
  2509. # Look for VideoPress embeds
  2510. videopress_urls = VideoPressIE._extract_urls(webpage)
  2511. if videopress_urls:
  2512. return self.playlist_from_matches(
  2513. videopress_urls, video_id, video_title, ie=VideoPressIE.ie_key())
  2514. # Look for Rutube embeds
  2515. rutube_urls = RutubeIE._extract_urls(webpage)
  2516. if rutube_urls:
  2517. return self.playlist_from_matches(
  2518. rutube_urls, ie=RutubeIE.ie_key())
  2519. # Look for WashingtonPost embeds
  2520. wapo_urls = WashingtonPostIE._extract_urls(webpage)
  2521. if wapo_urls:
  2522. return self.playlist_from_matches(
  2523. wapo_urls, video_id, video_title, ie=WashingtonPostIE.ie_key())
  2524. # Look for Mediaset embeds
  2525. mediaset_urls = MediasetIE._extract_urls(webpage)
  2526. if mediaset_urls:
  2527. return self.playlist_from_matches(
  2528. mediaset_urls, video_id, video_title, ie=MediasetIE.ie_key())
  2529. # Looking for http://schema.org/VideoObject
  2530. json_ld = self._search_json_ld(
  2531. webpage, video_id, default={}, expected_type='VideoObject')
  2532. if json_ld.get('url'):
  2533. info_dict.update({
  2534. 'title': video_title or info_dict['title'],
  2535. 'description': video_description,
  2536. 'thumbnail': video_thumbnail,
  2537. 'age_limit': age_limit
  2538. })
  2539. info_dict.update(json_ld)
  2540. return info_dict
  2541. # Look for HTML5 media
  2542. entries = self._parse_html5_media_entries(url, webpage, video_id, m3u8_id='hls')
  2543. if entries:
  2544. for entry in entries:
  2545. entry.update({
  2546. 'id': video_id,
  2547. 'title': video_title,
  2548. })
  2549. self._sort_formats(entry['formats'])
  2550. return self.playlist_result(entries)
  2551. jwplayer_data = self._find_jwplayer_data(
  2552. webpage, video_id, transform_source=js_to_json)
  2553. if jwplayer_data:
  2554. info = self._parse_jwplayer_data(
  2555. jwplayer_data, video_id, require_title=False, base_url=url)
  2556. if not info.get('title'):
  2557. info['title'] = video_title
  2558. return info
  2559. def check_video(vurl):
  2560. if YoutubeIE.suitable(vurl):
  2561. return True
  2562. if RtmpIE.suitable(vurl):
  2563. return True
  2564. vpath = compat_urlparse.urlparse(vurl).path
  2565. vext = determine_ext(vpath)
  2566. return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
  2567. def filter_video(urls):
  2568. return list(filter(check_video, urls))
  2569. # Start with something easy: JW Player in SWFObject
  2570. found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
  2571. if not found:
  2572. # Look for gorilla-vid style embedding
  2573. found = filter_video(re.findall(r'''(?sx)
  2574. (?:
  2575. jw_plugins|
  2576. JWPlayerOptions|
  2577. jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
  2578. )
  2579. .*?
  2580. ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
  2581. if not found:
  2582. # Broaden the search a little bit
  2583. found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
  2584. if not found:
  2585. # Broaden the findall a little bit: JWPlayer JS loader
  2586. found = filter_video(re.findall(
  2587. r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
  2588. if not found:
  2589. # Flow player
  2590. found = filter_video(re.findall(r'''(?xs)
  2591. flowplayer\("[^"]+",\s*
  2592. \{[^}]+?\}\s*,
  2593. \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
  2594. ["']?url["']?\s*:\s*["']([^"']+)["']
  2595. ''', webpage))
  2596. if not found:
  2597. # Cinerama player
  2598. found = re.findall(
  2599. r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
  2600. if not found:
  2601. # Try to find twitter cards info
  2602. # twitter:player:stream should be checked before twitter:player since
  2603. # it is expected to contain a raw stream (see
  2604. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2605. found = filter_video(re.findall(
  2606. r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
  2607. if not found:
  2608. # We look for Open Graph info:
  2609. # We have to match any number spaces between elements, some sites try to align them (eg.: statigr.am)
  2610. m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
  2611. # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
  2612. if m_video_type is not None:
  2613. found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
  2614. if not found:
  2615. REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
  2616. found = re.search(
  2617. r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
  2618. r'(?:[a-z-]+="[^"]+"\s+)*?content="%s' % REDIRECT_REGEX,
  2619. webpage)
  2620. if not found:
  2621. # Look also in Refresh HTTP header
  2622. refresh_header = head_response.headers.get('Refresh')
  2623. if refresh_header:
  2624. # In python 2 response HTTP headers are bytestrings
  2625. if sys.version_info < (3, 0) and isinstance(refresh_header, str):
  2626. refresh_header = refresh_header.decode('iso-8859-1')
  2627. found = re.search(REDIRECT_REGEX, refresh_header)
  2628. if found:
  2629. new_url = compat_urlparse.urljoin(url, unescapeHTML(found.group(1)))
  2630. if new_url != url:
  2631. self.report_following_redirect(new_url)
  2632. return {
  2633. '_type': 'url',
  2634. 'url': new_url,
  2635. }
  2636. else:
  2637. found = None
  2638. if not found:
  2639. # twitter:player is a https URL to iframe player that may or may not
  2640. # be supported by youtube-dl thus this is checked the very last (see
  2641. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2642. embed_url = self._html_search_meta('twitter:player', webpage, default=None)
  2643. if embed_url:
  2644. return self.url_result(embed_url)
  2645. if not found:
  2646. raise UnsupportedError(url)
  2647. entries = []
  2648. for video_url in orderedSet(found):
  2649. video_url = unescapeHTML(video_url)
  2650. video_url = video_url.replace('\\/', '/')
  2651. video_url = compat_urlparse.urljoin(url, video_url)
  2652. video_id = compat_urllib_parse_unquote(os.path.basename(video_url))
  2653. # Sometimes, jwplayer extraction will result in a YouTube URL
  2654. if YoutubeIE.suitable(video_url):
  2655. entries.append(self.url_result(video_url, 'Youtube'))
  2656. continue
  2657. # here's a fun little line of code for you:
  2658. video_id = os.path.splitext(video_id)[0]
  2659. entry_info_dict = {
  2660. 'id': video_id,
  2661. 'uploader': video_uploader,
  2662. 'title': video_title,
  2663. 'age_limit': age_limit,
  2664. }
  2665. if RtmpIE.suitable(video_url):
  2666. entry_info_dict.update({
  2667. '_type': 'url_transparent',
  2668. 'ie_key': RtmpIE.ie_key(),
  2669. 'url': video_url,
  2670. })
  2671. entries.append(entry_info_dict)
  2672. continue
  2673. ext = determine_ext(video_url)
  2674. if ext == 'smil':
  2675. entry_info_dict['formats'] = self._extract_smil_formats(video_url, video_id)
  2676. elif ext == 'xspf':
  2677. return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
  2678. elif ext == 'm3u8':
  2679. entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4')
  2680. elif ext == 'mpd':
  2681. entry_info_dict['formats'] = self._extract_mpd_formats(video_url, video_id)
  2682. elif ext == 'f4m':
  2683. entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id)
  2684. elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
  2685. # Just matching .ism/manifest is not enough to be reliably sure
  2686. # whether it's actually an ISM manifest or some other streaming
  2687. # manifest since there are various streaming URL formats
  2688. # possible (see [1]) as well as some other shenanigans like
  2689. # .smil/manifest URLs that actually serve an ISM (see [2]) and
  2690. # so on.
  2691. # Thus the most reasonable way to solve this is to delegate
  2692. # to generic extractor in order to look into the contents of
  2693. # the manifest itself.
  2694. # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
  2695. # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
  2696. entry_info_dict = self.url_result(
  2697. smuggle_url(video_url, {'to_generic': True}),
  2698. GenericIE.ie_key())
  2699. else:
  2700. entry_info_dict['url'] = video_url
  2701. if entry_info_dict.get('formats'):
  2702. self._sort_formats(entry_info_dict['formats'])
  2703. entries.append(entry_info_dict)
  2704. if len(entries) == 1:
  2705. return entries[0]
  2706. else:
  2707. for num, e in enumerate(entries, start=1):
  2708. # 'url' results don't have a title
  2709. if e.get('title') is not None:
  2710. e['title'] = '%s (%d)' % (e['title'], num)
  2711. return {
  2712. '_type': 'playlist',
  2713. 'entries': entries,
  2714. }