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.

3113 lines
126 KiB

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