generic.py 118 KB

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