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.

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