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.

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