generic.py 142 KB

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