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.

2575 lines
103 KiB

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