logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

generic.py (121626B)


  1. import os
  2. import re
  3. import types
  4. import urllib.parse
  5. import xml.etree.ElementTree
  6. from .common import InfoExtractor
  7. from .commonprotocols import RtmpIE
  8. from .youtube import YoutubeIE
  9. from ..compat import compat_etree_fromstring
  10. from ..cookies import LenientSimpleCookie
  11. from ..networking.exceptions import HTTPError
  12. from ..networking.impersonate import ImpersonateTarget
  13. from ..utils import (
  14. KNOWN_EXTENSIONS,
  15. MEDIA_EXTENSIONS,
  16. ExtractorError,
  17. UnsupportedError,
  18. determine_ext,
  19. determine_protocol,
  20. dict_get,
  21. extract_basic_auth,
  22. filter_dict,
  23. format_field,
  24. int_or_none,
  25. is_html,
  26. js_to_json,
  27. merge_dicts,
  28. mimetype2ext,
  29. orderedSet,
  30. parse_duration,
  31. parse_resolution,
  32. smuggle_url,
  33. str_or_none,
  34. traverse_obj,
  35. try_call,
  36. unescapeHTML,
  37. unified_timestamp,
  38. unsmuggle_url,
  39. update_url_query,
  40. url_or_none,
  41. urlhandle_detect_ext,
  42. urljoin,
  43. variadic,
  44. xpath_attr,
  45. xpath_text,
  46. xpath_with_ns,
  47. )
  48. from ..utils._utils import _UnsafeExtensionError
  49. class GenericIE(InfoExtractor):
  50. IE_DESC = 'Generic downloader that works on some sites'
  51. _VALID_URL = r'.*'
  52. IE_NAME = 'generic'
  53. _NETRC_MACHINE = False # Suppress username warning
  54. _TESTS = [
  55. # Direct link to a video
  56. {
  57. 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
  58. 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
  59. 'info_dict': {
  60. 'id': 'trailer',
  61. 'ext': 'mp4',
  62. 'title': 'trailer',
  63. 'upload_date': '20100513',
  64. 'direct': True,
  65. 'timestamp': 1273772943.0,
  66. },
  67. },
  68. # Direct link to media delivered compressed (until Accept-Encoding is *)
  69. {
  70. 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
  71. 'md5': '128c42e68b13950268b648275386fc74',
  72. 'info_dict': {
  73. 'id': 'FictionJunction-Parallel_Hearts',
  74. 'ext': 'flac',
  75. 'title': 'FictionJunction-Parallel_Hearts',
  76. 'upload_date': '20140522',
  77. },
  78. 'expected_warnings': [
  79. 'URL could be a direct video link, returning it as such.',
  80. ],
  81. 'skip': 'URL invalid',
  82. },
  83. # Direct download with broken HEAD
  84. {
  85. 'url': 'http://ai-radio.org:8000/radio.opus',
  86. 'info_dict': {
  87. 'id': 'radio',
  88. 'ext': 'opus',
  89. 'title': 'radio',
  90. },
  91. 'params': {
  92. 'skip_download': True, # infinite live stream
  93. },
  94. 'expected_warnings': [
  95. r'501.*Not Implemented',
  96. r'400.*Bad Request',
  97. ],
  98. },
  99. # Direct link with incorrect MIME type
  100. {
  101. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  102. 'md5': '4ccbebe5f36706d85221f204d7eb5913',
  103. 'info_dict': {
  104. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  105. 'id': '5_Lennart_Poettering_-_Systemd',
  106. 'ext': 'webm',
  107. 'title': '5_Lennart_Poettering_-_Systemd',
  108. 'upload_date': '20141120',
  109. 'direct': True,
  110. 'timestamp': 1416498816.0,
  111. },
  112. 'expected_warnings': [
  113. 'URL could be a direct video link, returning it as such.',
  114. ],
  115. },
  116. # RSS feed
  117. {
  118. 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  119. 'info_dict': {
  120. 'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
  121. 'title': 'Zero Punctuation',
  122. 'description': 're:.*groundbreaking video review series.*',
  123. },
  124. 'playlist_mincount': 11,
  125. },
  126. # RSS feed with enclosure
  127. {
  128. 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  129. 'info_dict': {
  130. 'id': 'http://podcastfeeds.nbcnews.com/nbcnews/video/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  131. 'title': 'MSNBC Rachel Maddow (video)',
  132. 'description': 're:.*her unique approach to storytelling.*',
  133. },
  134. 'playlist': [{
  135. 'info_dict': {
  136. 'ext': 'mov',
  137. 'id': 'pdv_maddow_netcast_mov-12-03-2020-223726',
  138. 'title': 'MSNBC Rachel Maddow (video) - 12-03-2020-223726',
  139. 'description': 're:.*her unique approach to storytelling.*',
  140. 'upload_date': '20201204',
  141. },
  142. }],
  143. 'skip': 'Dead link',
  144. },
  145. # RSS feed with item with description and thumbnails
  146. {
  147. 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
  148. 'info_dict': {
  149. 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
  150. 'title': 're:.*100% Hydrogen.*',
  151. 'description': 're:.*In this episode.*',
  152. },
  153. 'playlist': [{
  154. 'info_dict': {
  155. 'ext': 'm4a',
  156. 'id': '818a5d38-01cd-152f-2231-ee479677fa82',
  157. 'title': 're:Hydrogen!',
  158. 'description': 're:.*In this episode we are going.*',
  159. 'timestamp': 1567977776,
  160. 'upload_date': '20190908',
  161. 'duration': 423,
  162. 'thumbnail': r're:^https?://.*\.jpg$',
  163. 'episode_number': 1,
  164. 'season_number': 1,
  165. 'age_limit': 0,
  166. 'season': 'Season 1',
  167. 'direct': True,
  168. 'episode': 'Episode 1',
  169. },
  170. }],
  171. 'params': {
  172. 'skip_download': True,
  173. },
  174. },
  175. # RSS feed with enclosures and unsupported link URLs
  176. {
  177. 'url': 'http://www.hellointernet.fm/podcast?format=rss',
  178. 'info_dict': {
  179. 'id': 'http://www.hellointernet.fm/podcast?format=rss',
  180. 'description': 'CGP Grey and Brady Haran talk about YouTube, life, work, whatever.',
  181. 'title': 'Hello Internet',
  182. },
  183. 'playlist_mincount': 100,
  184. },
  185. # RSS feed with guid
  186. {
  187. 'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
  188. 'info_dict': {
  189. 'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
  190. 'description': 'md5:be809a44b63b0c56fb485caf68685520',
  191. 'title': 'The Little Red Podcast',
  192. },
  193. 'playlist_mincount': 76,
  194. },
  195. # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
  196. {
  197. 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
  198. 'info_dict': {
  199. 'id': 'smil',
  200. 'ext': 'mp4',
  201. 'title': 'Automatics, robotics and biocybernetics',
  202. 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
  203. 'upload_date': '20130627',
  204. 'formats': 'mincount:16',
  205. 'subtitles': 'mincount:1',
  206. },
  207. 'params': {
  208. 'force_generic_extractor': True,
  209. 'skip_download': True,
  210. },
  211. },
  212. # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
  213. {
  214. 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
  215. 'info_dict': {
  216. 'id': 'hds',
  217. 'ext': 'flv',
  218. 'title': 'hds',
  219. 'formats': 'mincount:1',
  220. },
  221. 'params': {
  222. 'skip_download': True,
  223. },
  224. },
  225. # SMIL from https://www.restudy.dk/video/play/id/1637
  226. {
  227. 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
  228. 'info_dict': {
  229. 'id': 'video_1637',
  230. 'ext': 'flv',
  231. 'title': 'video_1637',
  232. 'formats': 'mincount:3',
  233. },
  234. 'params': {
  235. 'skip_download': True,
  236. },
  237. },
  238. # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
  239. {
  240. 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
  241. 'info_dict': {
  242. 'id': 'smil-service',
  243. 'ext': 'flv',
  244. 'title': 'smil-service',
  245. 'formats': 'mincount:1',
  246. },
  247. 'params': {
  248. 'skip_download': True,
  249. },
  250. },
  251. # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
  252. {
  253. 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
  254. 'info_dict': {
  255. 'id': '4719370',
  256. 'ext': 'mp4',
  257. 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
  258. 'formats': 'mincount:3',
  259. },
  260. 'params': {
  261. 'skip_download': True,
  262. },
  263. },
  264. # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
  265. {
  266. 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
  267. 'info_dict': {
  268. 'id': 'mZlp2ctYIUEB',
  269. 'ext': 'mp4',
  270. 'title': 'Tikibad ontruimd wegens brand',
  271. 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
  272. 'thumbnail': r're:^https?://.*\.jpg$',
  273. 'duration': 33,
  274. },
  275. 'params': {
  276. 'skip_download': True,
  277. },
  278. 'skip': '404 Not Found',
  279. },
  280. # MPD from http://dash-mse-test.appspot.com/media.html
  281. {
  282. 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
  283. 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
  284. 'info_dict': {
  285. 'id': 'car-20120827-manifest',
  286. 'ext': 'mp4',
  287. 'title': 'car-20120827-manifest',
  288. 'formats': 'mincount:9',
  289. 'upload_date': '20130904',
  290. 'timestamp': 1378272859.0,
  291. },
  292. },
  293. # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
  294. {
  295. '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',
  296. 'info_dict': {
  297. 'id': 'content',
  298. 'ext': 'mp4',
  299. 'title': 'content',
  300. 'formats': 'mincount:8',
  301. },
  302. 'params': {
  303. # m3u8 downloads
  304. 'skip_download': True,
  305. },
  306. 'skip': 'video gone',
  307. },
  308. # m3u8 served with Content-Type: text/plain
  309. {
  310. 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
  311. 'info_dict': {
  312. 'id': 'index',
  313. 'ext': 'mp4',
  314. 'title': 'index',
  315. 'upload_date': '20140720',
  316. 'formats': 'mincount:11',
  317. },
  318. 'params': {
  319. # m3u8 downloads
  320. 'skip_download': True,
  321. },
  322. 'skip': 'video gone',
  323. },
  324. # google redirect
  325. {
  326. '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',
  327. 'info_dict': {
  328. 'id': 'cmQHVoWB5FY',
  329. 'ext': 'mp4',
  330. 'upload_date': '20130224',
  331. 'uploader_id': '@TheVerge',
  332. 'description': r're:^Chris Ziegler takes a look at the\.*',
  333. 'uploader': 'The Verge',
  334. 'title': 'First Firefox OS phones side-by-side',
  335. },
  336. 'params': {
  337. 'skip_download': False,
  338. },
  339. },
  340. {
  341. # redirect in Refresh HTTP header
  342. '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',
  343. 'info_dict': {
  344. 'id': 'pO8h3EaFRdo',
  345. 'ext': 'mp4',
  346. 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
  347. 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
  348. 'upload_date': '20150917',
  349. 'uploader_id': 'brtvofficial',
  350. 'uploader': 'Boiler Room',
  351. },
  352. 'params': {
  353. 'skip_download': False,
  354. },
  355. },
  356. {
  357. 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
  358. 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
  359. 'info_dict': {
  360. 'id': '13601338388002',
  361. 'ext': 'mp4',
  362. 'uploader': 'www.hodiho.fr',
  363. 'title': 'R\u00e9gis plante sa Jeep',
  364. },
  365. },
  366. # bandcamp page with custom domain
  367. {
  368. 'add_ie': ['Bandcamp'],
  369. 'url': 'http://bronyrock.com/track/the-pony-mash',
  370. 'info_dict': {
  371. 'id': '3235767654',
  372. 'ext': 'mp3',
  373. 'title': 'The Pony Mash',
  374. 'uploader': 'M_Pallante',
  375. },
  376. 'skip': 'There is a limit of 200 free downloads / month for the test song',
  377. },
  378. # embed.ly video
  379. {
  380. 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
  381. 'info_dict': {
  382. 'id': '9ODmcdjQcHQ',
  383. 'ext': 'mp4',
  384. 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
  385. 'upload_date': '20140225',
  386. 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
  387. 'uploader': 'Tested',
  388. 'uploader_id': 'testedcom',
  389. },
  390. # No need to test YoutubeIE here
  391. 'params': {
  392. 'skip_download': True,
  393. },
  394. },
  395. # funnyordie embed
  396. {
  397. 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
  398. 'info_dict': {
  399. 'id': '18e820ec3f',
  400. 'ext': 'mp4',
  401. 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
  402. 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
  403. },
  404. # HEAD requests lead to endless 301, while GET is OK
  405. 'expected_warnings': ['301'],
  406. },
  407. # RUTV embed
  408. {
  409. 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
  410. 'info_dict': {
  411. 'id': '776940',
  412. 'ext': 'mp4',
  413. 'title': 'Охотское море стало целиком российским',
  414. 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
  415. },
  416. 'params': {
  417. # m3u8 download
  418. 'skip_download': True,
  419. },
  420. },
  421. # TVC embed
  422. {
  423. '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/',
  424. 'info_dict': {
  425. 'id': '55304',
  426. 'ext': 'mp4',
  427. 'title': 'Дошкольное воспитание',
  428. },
  429. },
  430. # SportBox embed
  431. {
  432. 'url': 'http://www.vestifinance.ru/articles/25753',
  433. 'info_dict': {
  434. 'id': '25753',
  435. 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
  436. },
  437. 'playlist': [{
  438. 'info_dict': {
  439. 'id': '370908',
  440. 'title': 'Госзаказ. День 3',
  441. 'ext': 'mp4',
  442. },
  443. }, {
  444. 'info_dict': {
  445. 'id': '370905',
  446. 'title': 'Госзаказ. День 2',
  447. 'ext': 'mp4',
  448. },
  449. }, {
  450. 'info_dict': {
  451. 'id': '370902',
  452. 'title': 'Госзаказ. День 1',
  453. 'ext': 'mp4',
  454. },
  455. }],
  456. 'params': {
  457. # m3u8 download
  458. 'skip_download': True,
  459. },
  460. },
  461. # Myvi.ru embed
  462. {
  463. 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
  464. 'info_dict': {
  465. 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
  466. 'ext': 'mp4',
  467. 'title': 'Ужастики, русский трейлер (2015)',
  468. 'thumbnail': r're:^https?://.*\.jpg$',
  469. 'duration': 153,
  470. },
  471. 'skip': 'Site dead',
  472. },
  473. # XHamster embed
  474. {
  475. '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',
  476. 'info_dict': {
  477. 'id': 'showthread',
  478. 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
  479. },
  480. 'playlist_mincount': 7,
  481. # This forum does not allow <iframe> syntaxes anymore
  482. # Now HTML tags are displayed as-is
  483. 'skip': 'No videos on this page',
  484. },
  485. # Embedded TED video
  486. {
  487. 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
  488. 'md5': '65fdff94098e4a607385a60c5177c638',
  489. 'info_dict': {
  490. 'id': '1969',
  491. 'ext': 'mp4',
  492. 'title': 'Hidden miracles of the natural world',
  493. 'uploader': 'Louie Schwartzberg',
  494. 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
  495. },
  496. },
  497. # nowvideo embed hidden behind percent encoding
  498. {
  499. 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
  500. 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
  501. 'info_dict': {
  502. 'id': '06e53103ca9aa',
  503. 'ext': 'flv',
  504. 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
  505. 'description': 'No description',
  506. },
  507. },
  508. # arte embed
  509. {
  510. 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
  511. 'md5': '7653032cbb25bf6c80d80f217055fa43',
  512. 'info_dict': {
  513. 'id': '048195-004_PLUS7-F',
  514. 'ext': 'flv',
  515. 'title': 'X:enius',
  516. 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
  517. 'upload_date': '20140320',
  518. },
  519. 'params': {
  520. 'skip_download': 'Requires rtmpdump',
  521. },
  522. 'skip': 'video gone',
  523. },
  524. # francetv embed
  525. {
  526. 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
  527. 'info_dict': {
  528. 'id': 'EV_30231',
  529. 'ext': 'mp4',
  530. 'title': 'Alcaline, le concert avec Calogero',
  531. 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
  532. 'upload_date': '20150226',
  533. 'timestamp': 1424989860,
  534. 'duration': 5400,
  535. },
  536. 'params': {
  537. # m3u8 downloads
  538. 'skip_download': True,
  539. },
  540. 'expected_warnings': [
  541. 'Forbidden',
  542. ],
  543. },
  544. # Condé Nast embed
  545. {
  546. 'url': 'http://www.wired.com/2014/04/honda-asimo/',
  547. 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
  548. 'info_dict': {
  549. 'id': '53501be369702d3275860000',
  550. 'ext': 'mp4',
  551. 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
  552. },
  553. },
  554. # Dailymotion embed
  555. {
  556. 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
  557. 'md5': '441aeeb82eb72c422c7f14ec533999cd',
  558. 'info_dict': {
  559. 'id': 'k2mm4bCdJ6CQ2i7c8o2',
  560. 'ext': 'mp4',
  561. 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
  562. 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
  563. 'uploader': 'Spi0n',
  564. 'uploader_id': 'xgditw',
  565. 'upload_date': '20140425',
  566. 'timestamp': 1398441542,
  567. },
  568. 'add_ie': ['Dailymotion'],
  569. },
  570. # DailyMail embed
  571. {
  572. 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
  573. 'info_dict': {
  574. 'id': '1495629',
  575. 'ext': 'mp4',
  576. 'title': 'Care worker punches elderly dementia patient in head 11 times',
  577. 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
  578. },
  579. 'add_ie': ['DailyMail'],
  580. 'params': {
  581. 'skip_download': True,
  582. },
  583. },
  584. # YouTube embed
  585. {
  586. 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
  587. 'info_dict': {
  588. 'id': 'FXRb4ykk4S0',
  589. 'ext': 'mp4',
  590. 'title': 'The NBL Auction 2014',
  591. 'uploader': 'BADMINTON England',
  592. 'uploader_id': 'BADMINTONEvents',
  593. 'upload_date': '20140603',
  594. 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
  595. },
  596. 'add_ie': ['Youtube'],
  597. 'params': {
  598. 'skip_download': True,
  599. },
  600. },
  601. # MTVServices embed
  602. {
  603. 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
  604. 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
  605. 'info_dict': {
  606. 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
  607. 'ext': 'mp4',
  608. 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
  609. 'description': 'Two valets share their love for movie star Liam Neesons.',
  610. 'timestamp': 1349922600,
  611. 'upload_date': '20121011',
  612. },
  613. },
  614. # YouTube embed via <data-embed-url="">
  615. {
  616. 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
  617. 'info_dict': {
  618. 'id': '4vAffPZIT44',
  619. 'ext': 'mp4',
  620. 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
  621. 'uploader': 'Gameloft',
  622. 'uploader_id': 'gameloft',
  623. 'upload_date': '20140828',
  624. 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
  625. },
  626. 'params': {
  627. 'skip_download': True,
  628. },
  629. },
  630. # Flowplayer
  631. {
  632. 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
  633. 'md5': '9d65602bf31c6e20014319c7d07fba27',
  634. 'info_dict': {
  635. 'id': '5123ea6d5e5a7',
  636. 'ext': 'mp4',
  637. 'age_limit': 18,
  638. 'uploader': 'www.handjobhub.com',
  639. 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
  640. },
  641. },
  642. # MLB embed
  643. {
  644. 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
  645. 'md5': '96f09a37e44da40dd083e12d9a683327',
  646. 'info_dict': {
  647. 'id': '33322633',
  648. 'ext': 'mp4',
  649. 'title': 'Ump changes call to ball',
  650. 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
  651. 'duration': 48,
  652. 'timestamp': 1401537900,
  653. 'upload_date': '20140531',
  654. 'thumbnail': r're:^https?://.*\.jpg$',
  655. },
  656. },
  657. # Wistia standard embed (async)
  658. {
  659. 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
  660. 'info_dict': {
  661. 'id': '807fafadvk',
  662. 'ext': 'mp4',
  663. 'title': 'Drip Brennan Dunn Workshop',
  664. 'description': 'a JV Webinars video from getdrip-1',
  665. 'duration': 4986.95,
  666. 'timestamp': 1463607249,
  667. 'upload_date': '20160518',
  668. },
  669. 'params': {
  670. 'skip_download': True,
  671. },
  672. 'skip': 'webpage 404 not found',
  673. },
  674. # Soundcloud embed
  675. {
  676. 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
  677. 'info_dict': {
  678. 'id': '174391317',
  679. 'ext': 'mp3',
  680. 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
  681. 'uploader': 'Sophos Security',
  682. 'title': 'Chet Chat 171 - Oct 29, 2014',
  683. 'upload_date': '20141029',
  684. },
  685. },
  686. # Soundcloud multiple embeds
  687. {
  688. 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
  689. 'info_dict': {
  690. 'id': '52809',
  691. 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
  692. },
  693. 'playlist_mincount': 7,
  694. },
  695. # TuneIn station embed
  696. {
  697. 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
  698. 'info_dict': {
  699. 'id': '204146',
  700. 'ext': 'mp3',
  701. 'title': 'CNRV',
  702. 'location': 'Paris, France',
  703. 'is_live': True,
  704. },
  705. 'params': {
  706. # Live stream
  707. 'skip_download': True,
  708. },
  709. },
  710. # Livestream embed
  711. {
  712. 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
  713. 'info_dict': {
  714. 'id': '67864563',
  715. 'ext': 'flv',
  716. 'upload_date': '20141112',
  717. 'title': 'Rosetta #CometLanding webcast HL 10',
  718. },
  719. },
  720. # Another Livestream embed, without 'new.' in URL
  721. {
  722. 'url': 'https://www.freespeech.org/',
  723. 'info_dict': {
  724. 'id': '123537347',
  725. 'ext': 'mp4',
  726. 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
  727. },
  728. 'params': {
  729. # Live stream
  730. 'skip_download': True,
  731. },
  732. },
  733. # LazyYT
  734. {
  735. 'url': 'https://skiplagged.com/',
  736. 'info_dict': {
  737. 'id': 'skiplagged',
  738. 'title': 'Skiplagged: The smart way to find cheap flights',
  739. },
  740. 'playlist_mincount': 1,
  741. 'add_ie': ['Youtube'],
  742. },
  743. # Libsyn embed
  744. {
  745. 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
  746. 'info_dict': {
  747. 'id': '3793998',
  748. 'ext': 'mp3',
  749. 'upload_date': '20141126',
  750. 'title': 'Underground Wellness Radio - Jack Tips: 5 Steps to Permanent Gut Healing',
  751. 'thumbnail': 'https://assets.libsyn.com/secure/item/3793998/?height=90&width=90',
  752. 'duration': 3989.0,
  753. },
  754. },
  755. # Cinerama player
  756. {
  757. 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
  758. 'info_dict': {
  759. 'id': '730m_DandD_1901_512k',
  760. 'ext': 'mp4',
  761. 'uploader': 'www.abc.net.au',
  762. 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
  763. },
  764. },
  765. # embedded viddler video
  766. {
  767. 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
  768. 'info_dict': {
  769. 'id': '4d03aad9',
  770. 'ext': 'mp4',
  771. 'uploader': 'deadspin',
  772. 'title': 'WALL-TO-GORTAT',
  773. 'timestamp': 1422285291,
  774. 'upload_date': '20150126',
  775. },
  776. 'add_ie': ['Viddler'],
  777. },
  778. # Libsyn embed
  779. {
  780. 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
  781. 'info_dict': {
  782. 'id': '3377616',
  783. 'ext': 'mp3',
  784. 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
  785. 'description': 'md5:601cb790edd05908957dae8aaa866465',
  786. 'upload_date': '20150220',
  787. },
  788. 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
  789. },
  790. # jwplayer YouTube
  791. {
  792. 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
  793. 'info_dict': {
  794. 'id': 'Mrj4DVp2zeA',
  795. 'ext': 'mp4',
  796. 'upload_date': '20150212',
  797. 'uploader': 'The National Archives UK',
  798. 'description': 'md5:8078af856dca76edc42910b61273dbbf',
  799. 'uploader_id': 'NationalArchives08',
  800. 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
  801. },
  802. },
  803. # jwplayer rtmp
  804. {
  805. 'url': 'http://www.suffolk.edu/sjc/live.php',
  806. 'info_dict': {
  807. 'id': 'live',
  808. 'ext': 'flv',
  809. 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
  810. 'uploader': 'www.suffolk.edu',
  811. },
  812. 'params': {
  813. 'skip_download': True,
  814. },
  815. 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
  816. },
  817. # jwplayer with only the json URL
  818. {
  819. 'url': 'https://www.hollywoodreporter.com/news/general-news/dunkirk-team-reveals-what-christopher-nolan-said-oscar-win-meet-your-oscar-winner-1092454',
  820. 'info_dict': {
  821. 'id': 'TljWkvWH',
  822. 'ext': 'mp4',
  823. 'upload_date': '20180306',
  824. 'title': 'md5:91eb1862f6526415214f62c00b453936',
  825. 'description': 'md5:73048ae50ae953da10549d1d2fe9b3aa',
  826. 'timestamp': 1520367225,
  827. },
  828. 'params': {
  829. 'skip_download': True,
  830. },
  831. },
  832. # Complex jwplayer
  833. {
  834. 'url': 'http://www.indiedb.com/games/king-machine/videos',
  835. 'info_dict': {
  836. 'id': 'videos',
  837. 'ext': 'mp4',
  838. 'title': 'king machine trailer 1',
  839. 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
  840. 'thumbnail': r're:^https?://.*\.jpg$',
  841. },
  842. },
  843. {
  844. # Youtube embed, formerly: Video.js embed, multiple formats
  845. 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
  846. 'info_dict': {
  847. 'id': 'yygqldloqIk',
  848. 'ext': 'mp4',
  849. 'title': 'SolidWorks. Урок 6 Настройка чертежа',
  850. 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
  851. 'upload_date': '20130314',
  852. 'uploader': 'PROстое3D',
  853. 'uploader_id': 'PROstoe3D',
  854. },
  855. 'params': {
  856. 'skip_download': True,
  857. },
  858. },
  859. {
  860. # Video.js embed, single format
  861. 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
  862. 'info_dict': {
  863. 'id': 'watch',
  864. 'ext': 'mp4',
  865. 'title': 'Step 1 - Good Foundation',
  866. 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
  867. },
  868. 'params': {
  869. 'skip_download': True,
  870. },
  871. 'skip': '404 Not Found',
  872. },
  873. # rtl.nl embed
  874. {
  875. 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
  876. 'playlist_mincount': 5,
  877. 'info_dict': {
  878. 'id': 'aanslagen-kopenhagen',
  879. 'title': 'Aanslagen Kopenhagen',
  880. },
  881. },
  882. # Zapiks embed
  883. {
  884. 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
  885. 'info_dict': {
  886. 'id': '118046',
  887. 'ext': 'mp4',
  888. 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
  889. },
  890. },
  891. # Kaltura embed (different embed code)
  892. {
  893. 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
  894. 'info_dict': {
  895. 'id': '1_a52wc67y',
  896. 'ext': 'flv',
  897. 'upload_date': '20150127',
  898. 'uploader_id': 'PremierMedia',
  899. 'timestamp': int,
  900. 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
  901. },
  902. },
  903. # Kaltura embed with single quotes
  904. {
  905. 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
  906. 'info_dict': {
  907. 'id': '0_izeg5utt',
  908. 'ext': 'mp4',
  909. 'title': '35871',
  910. 'timestamp': 1355743100,
  911. 'upload_date': '20121217',
  912. 'uploader_id': 'cplapp@learn360.com',
  913. },
  914. 'add_ie': ['Kaltura'],
  915. },
  916. {
  917. # Kaltura embedded via quoted entry_id
  918. 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
  919. 'info_dict': {
  920. 'id': '0_utuok90b',
  921. 'ext': 'mp4',
  922. 'title': '06_matthew_brender_raj_dutt',
  923. 'timestamp': 1466638791,
  924. 'upload_date': '20160622',
  925. },
  926. 'add_ie': ['Kaltura'],
  927. 'expected_warnings': [
  928. 'Could not send HEAD request',
  929. ],
  930. 'params': {
  931. 'skip_download': True,
  932. },
  933. },
  934. {
  935. # Kaltura embedded, some fileExt broken (#11480)
  936. 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
  937. 'info_dict': {
  938. 'id': '1_sgtvehim',
  939. 'ext': 'mp4',
  940. 'title': 'Our "Standard Models" of particle physics and cosmology',
  941. 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
  942. 'timestamp': 1321158993,
  943. 'upload_date': '20111113',
  944. 'uploader_id': 'kps1',
  945. },
  946. 'add_ie': ['Kaltura'],
  947. },
  948. {
  949. # Kaltura iframe embed
  950. 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
  951. 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
  952. 'info_dict': {
  953. 'id': '0_f2cfbpwy',
  954. 'ext': 'mp4',
  955. 'title': 'I. M. Pei: A Centennial Celebration',
  956. 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
  957. 'upload_date': '20170403',
  958. 'uploader_id': 'batchUser',
  959. 'timestamp': 1491232186,
  960. },
  961. 'add_ie': ['Kaltura'],
  962. },
  963. {
  964. # Kaltura iframe embed, more sophisticated
  965. 'url': 'http://www.cns.nyu.edu/~eero/math-tools/Videos/lecture-05sep2017.html',
  966. 'info_dict': {
  967. 'id': '1_9gzouybz',
  968. 'ext': 'mp4',
  969. 'title': 'lecture-05sep2017',
  970. 'description': 'md5:40f347d91fd4ba047e511c5321064b49',
  971. 'upload_date': '20170913',
  972. 'uploader_id': 'eps2',
  973. 'timestamp': 1505340777,
  974. },
  975. 'params': {
  976. 'skip_download': True,
  977. },
  978. 'add_ie': ['Kaltura'],
  979. },
  980. {
  981. # meta twitter:player
  982. 'url': 'http://thechive.com/2017/12/08/all-i-want-for-christmas-is-more-twerk/',
  983. 'info_dict': {
  984. 'id': '0_01b42zps',
  985. 'ext': 'mp4',
  986. 'title': 'Main Twerk (Video)',
  987. 'upload_date': '20171208',
  988. 'uploader_id': 'sebastian.salinas@thechive.com',
  989. 'timestamp': 1512713057,
  990. },
  991. 'params': {
  992. 'skip_download': True,
  993. },
  994. 'add_ie': ['Kaltura'],
  995. },
  996. # referrer protected EaglePlatform embed
  997. {
  998. 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
  999. 'info_dict': {
  1000. 'id': '582306',
  1001. 'ext': 'mp4',
  1002. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  1003. 'thumbnail': r're:^https?://.*\.jpg$',
  1004. 'duration': 3382,
  1005. 'view_count': int,
  1006. },
  1007. 'params': {
  1008. 'skip_download': True,
  1009. },
  1010. },
  1011. # ClipYou (EaglePlatform) embed (custom URL)
  1012. {
  1013. 'url': 'http://muz-tv.ru/play/7129/',
  1014. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1015. 'info_dict': {
  1016. 'id': '12820',
  1017. 'ext': 'mp4',
  1018. 'title': "'O Sole Mio",
  1019. 'thumbnail': r're:^https?://.*\.jpg$',
  1020. 'duration': 216,
  1021. 'view_count': int,
  1022. },
  1023. 'params': {
  1024. 'skip_download': True,
  1025. },
  1026. 'skip': 'This video is unavailable.',
  1027. },
  1028. # Pladform embed
  1029. {
  1030. 'url': 'http://muz-tv.ru/kinozal/view/7400/',
  1031. 'info_dict': {
  1032. 'id': '100183293',
  1033. 'ext': 'mp4',
  1034. 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
  1035. 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
  1036. 'thumbnail': r're:^https?://.*\.jpg$',
  1037. 'duration': 694,
  1038. 'age_limit': 0,
  1039. },
  1040. 'skip': 'HTTP Error 404: Not Found',
  1041. },
  1042. # Playwire embed
  1043. {
  1044. 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
  1045. 'info_dict': {
  1046. 'id': '3519514',
  1047. 'ext': 'mp4',
  1048. 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
  1049. 'thumbnail': r're:^https?://.*\.png$',
  1050. 'duration': 45.115,
  1051. },
  1052. },
  1053. # Crooks and Liars embed
  1054. {
  1055. 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
  1056. 'info_dict': {
  1057. 'id': '8RUoRhRi',
  1058. 'ext': 'mp4',
  1059. 'title': 'Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!',
  1060. 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
  1061. 'timestamp': 1428207000,
  1062. 'upload_date': '20150405',
  1063. 'uploader': 'Heather',
  1064. },
  1065. },
  1066. # Crooks and Liars external embed
  1067. {
  1068. 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
  1069. 'info_dict': {
  1070. 'id': 'MTE3MjUtMzQ2MzA',
  1071. 'ext': 'mp4',
  1072. 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
  1073. 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
  1074. 'timestamp': 1265032391,
  1075. 'upload_date': '20100201',
  1076. 'uploader': 'Heather',
  1077. },
  1078. },
  1079. # NBC Sports vplayer embed
  1080. {
  1081. 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
  1082. 'info_dict': {
  1083. 'id': 'ln7x1qSThw4k',
  1084. 'ext': 'flv',
  1085. 'title': "PFT Live: New leader in the 'new-look' defense",
  1086. 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
  1087. 'uploader': 'NBCU-SPORTS',
  1088. 'upload_date': '20140107',
  1089. 'timestamp': 1389118457,
  1090. },
  1091. 'skip': 'Invalid Page URL',
  1092. },
  1093. # NBC News embed
  1094. {
  1095. 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
  1096. 'md5': '1aa589c675898ae6d37a17913cf68d66',
  1097. 'info_dict': {
  1098. 'id': 'x_dtl_oa_LettermanliftPR_160608',
  1099. 'ext': 'mp4',
  1100. 'title': 'David Letterman: A Preview',
  1101. '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.',
  1102. 'upload_date': '20160609',
  1103. 'timestamp': 1465431544,
  1104. 'uploader': 'NBCU-NEWS',
  1105. },
  1106. },
  1107. # UDN embed
  1108. {
  1109. 'url': 'https://video.udn.com/news/300346',
  1110. 'md5': 'fd2060e988c326991037b9aff9df21a6',
  1111. 'info_dict': {
  1112. 'id': '300346',
  1113. 'ext': 'mp4',
  1114. 'title': '中一中男師變性 全校師生力挺',
  1115. 'thumbnail': r're:^https?://.*\.jpg$',
  1116. },
  1117. 'params': {
  1118. # m3u8 download
  1119. 'skip_download': True,
  1120. },
  1121. 'expected_warnings': ['Failed to parse JSON Expecting value'],
  1122. },
  1123. # Kinja embed
  1124. {
  1125. 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
  1126. 'info_dict': {
  1127. 'id': '106351',
  1128. 'ext': 'mp4',
  1129. 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
  1130. 'description': 'Migrated from OnionStudios',
  1131. 'thumbnail': r're:^https?://.*\.jpe?g$',
  1132. 'uploader': 'clickhole',
  1133. 'upload_date': '20150527',
  1134. 'timestamp': 1432744860,
  1135. },
  1136. },
  1137. # SnagFilms embed
  1138. {
  1139. 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
  1140. 'info_dict': {
  1141. 'id': '74849a00-85a9-11e1-9660-123139220831',
  1142. 'ext': 'mp4',
  1143. 'title': '#whilewewatch',
  1144. },
  1145. },
  1146. # AdobeTVVideo embed
  1147. {
  1148. 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
  1149. 'md5': '43662b577c018ad707a63766462b1e87',
  1150. 'info_dict': {
  1151. 'id': '2456',
  1152. 'ext': 'mp4',
  1153. 'title': 'New experience with Acrobat DC',
  1154. 'description': 'New experience with Acrobat DC',
  1155. 'duration': 248.667,
  1156. },
  1157. },
  1158. # Another form of arte.tv embed
  1159. {
  1160. 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
  1161. 'md5': '850bfe45417ddf221288c88a0cffe2e2',
  1162. 'info_dict': {
  1163. 'id': '030273-562_PLUS7-F',
  1164. 'ext': 'mp4',
  1165. 'title': 'ARTE Reportage - Nulle part, en France',
  1166. 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
  1167. 'upload_date': '20160409',
  1168. },
  1169. },
  1170. # Duplicated embedded video URLs
  1171. {
  1172. 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
  1173. 'info_dict': {
  1174. 'id': '149298443_480_16c25b74_2',
  1175. 'ext': 'mp4',
  1176. 'title': 'vs. Blue Orange Spring Game',
  1177. 'uploader': 'www.hudl.com',
  1178. },
  1179. },
  1180. # twitter:player:stream embed
  1181. {
  1182. 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
  1183. 'info_dict': {
  1184. 'id': 'master',
  1185. 'ext': 'mp4',
  1186. 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
  1187. 'uploader': 'www.rtl.be',
  1188. },
  1189. 'params': {
  1190. # m3u8 downloads
  1191. 'skip_download': True,
  1192. },
  1193. },
  1194. # twitter:player embed
  1195. {
  1196. 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
  1197. 'md5': 'a3e0df96369831de324f0778e126653c',
  1198. 'info_dict': {
  1199. 'id': '4909620399001',
  1200. 'ext': 'mp4',
  1201. 'title': 'What Do Black Holes Sound Like?',
  1202. 'description': 'what do black holes sound like',
  1203. 'upload_date': '20160524',
  1204. 'uploader_id': '29913724001',
  1205. 'timestamp': 1464107587,
  1206. 'uploader': 'TheAtlantic',
  1207. },
  1208. 'skip': 'Private Youtube video',
  1209. },
  1210. # Facebook <iframe> embed
  1211. {
  1212. 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
  1213. 'md5': 'fbcde74f534176ecb015849146dd3aee',
  1214. 'info_dict': {
  1215. 'id': '599637780109885',
  1216. 'ext': 'mp4',
  1217. 'title': 'Facebook video #599637780109885',
  1218. },
  1219. },
  1220. # Facebook <iframe> embed, plugin video
  1221. {
  1222. 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
  1223. 'info_dict': {
  1224. 'id': '1754168231264132',
  1225. 'ext': 'mp4',
  1226. 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
  1227. 'uploader': 'Tariq Ramadan (official)',
  1228. 'timestamp': 1496758379,
  1229. 'upload_date': '20170606',
  1230. },
  1231. 'params': {
  1232. 'skip_download': True,
  1233. },
  1234. },
  1235. # Facebook API embed
  1236. {
  1237. 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
  1238. 'md5': 'a47372ee61b39a7b90287094d447d94e',
  1239. 'info_dict': {
  1240. 'id': '10153467542406923',
  1241. 'ext': 'mp4',
  1242. 'title': 'Facebook video #10153467542406923',
  1243. },
  1244. },
  1245. # Wordpress "YouTube Video Importer" plugin
  1246. {
  1247. 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
  1248. 'md5': 'd16797741b560b485194eddda8121b48',
  1249. 'info_dict': {
  1250. 'id': 'HNTXWDXV9Is',
  1251. 'ext': 'mp4',
  1252. 'title': 'Blue Devils Drumline Stanford lot 2016',
  1253. 'upload_date': '20160627',
  1254. 'uploader_id': 'GENOCIDE8GENERAL10',
  1255. 'uploader': 'cylus cyrus',
  1256. },
  1257. },
  1258. {
  1259. # video stored on custom kaltura server
  1260. 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
  1261. 'md5': '537617d06e64dfed891fa1593c4b30cc',
  1262. 'info_dict': {
  1263. 'id': '0_1iotm5bh',
  1264. 'ext': 'mp4',
  1265. 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
  1266. 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
  1267. 'uploader_id': 'videos.expansion@el-mundo.net',
  1268. 'upload_date': '20150429',
  1269. 'timestamp': 1430303472,
  1270. },
  1271. 'add_ie': ['Kaltura'],
  1272. },
  1273. {
  1274. # multiple kaltura embeds, nsfw
  1275. 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html',
  1276. 'info_dict': {
  1277. 'id': 'kamila-avec-video-jaime-sadomie',
  1278. 'title': "Kamila avec vídeo “J'aime sadomie”",
  1279. },
  1280. 'playlist_count': 8,
  1281. },
  1282. {
  1283. # Non-standard Vimeo embed
  1284. 'url': 'https://openclassrooms.com/courses/understanding-the-web',
  1285. 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
  1286. 'info_dict': {
  1287. 'id': '148867247',
  1288. 'ext': 'mp4',
  1289. 'title': 'Understanding the web - Teaser',
  1290. 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
  1291. 'upload_date': '20151214',
  1292. 'uploader': 'OpenClassrooms',
  1293. 'uploader_id': 'openclassrooms',
  1294. },
  1295. 'add_ie': ['Vimeo'],
  1296. },
  1297. {
  1298. # generic vimeo embed that requires original URL passed as Referer
  1299. 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
  1300. 'only_matching': True,
  1301. },
  1302. {
  1303. 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
  1304. 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
  1305. 'info_dict': {
  1306. 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
  1307. 'ext': 'mp4',
  1308. 'title': 'Big Buck Bunny',
  1309. 'description': 'Royalty free test video',
  1310. 'timestamp': 1432816365,
  1311. 'upload_date': '20150528',
  1312. 'is_live': False,
  1313. },
  1314. 'params': {
  1315. 'skip_download': True,
  1316. },
  1317. 'add_ie': ['Arkena'],
  1318. },
  1319. {
  1320. '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/',
  1321. 'info_dict': {
  1322. 'id': '1c7141f46c',
  1323. 'ext': 'mp4',
  1324. 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
  1325. },
  1326. 'params': {
  1327. 'skip_download': True,
  1328. },
  1329. 'add_ie': ['Vbox7'],
  1330. },
  1331. {
  1332. # DBTV embeds
  1333. 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
  1334. 'info_dict': {
  1335. 'id': '43254897',
  1336. 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
  1337. },
  1338. 'playlist_mincount': 3,
  1339. },
  1340. {
  1341. # Videa embeds
  1342. 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
  1343. 'info_dict': {
  1344. 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
  1345. 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
  1346. },
  1347. 'playlist_mincount': 2,
  1348. },
  1349. {
  1350. # 20 minuten embed
  1351. 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
  1352. 'info_dict': {
  1353. 'id': '523629',
  1354. 'ext': 'mp4',
  1355. 'title': 'So kommen Sie bei Eis und Schnee sicher an',
  1356. 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
  1357. },
  1358. 'params': {
  1359. 'skip_download': True,
  1360. },
  1361. 'add_ie': ['TwentyMinuten'],
  1362. },
  1363. {
  1364. # VideoPress embed
  1365. 'url': 'https://en.support.wordpress.com/videopress/',
  1366. 'info_dict': {
  1367. 'id': 'OcobLTqC',
  1368. 'ext': 'm4v',
  1369. 'title': 'IMG_5786',
  1370. 'timestamp': 1435711927,
  1371. 'upload_date': '20150701',
  1372. },
  1373. 'params': {
  1374. 'skip_download': True,
  1375. },
  1376. 'add_ie': ['VideoPress'],
  1377. },
  1378. {
  1379. # Rutube embed
  1380. 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
  1381. 'info_dict': {
  1382. 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
  1383. 'ext': 'flv',
  1384. 'title': 'Магаззино: Казань 2',
  1385. 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
  1386. 'uploader': 'Магаззино',
  1387. 'upload_date': '20170228',
  1388. 'uploader_id': '996642',
  1389. },
  1390. 'params': {
  1391. 'skip_download': True,
  1392. },
  1393. 'add_ie': ['Rutube'],
  1394. },
  1395. {
  1396. # glomex:embed
  1397. 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes',
  1398. 'info_dict': {
  1399. 'id': 'v-ch2nkhcirwc9-sf',
  1400. 'ext': 'mp4',
  1401. 'title': 'md5:786e1e24e06c55993cee965ef853a0c1',
  1402. 'description': 'md5:8b517a61d577efe7e36fde72fd535995',
  1403. 'timestamp': 1641885019,
  1404. 'upload_date': '20220111',
  1405. 'duration': 460000,
  1406. 'thumbnail': 'https://i3thumbs.glomex.com/dC1idjJwdndiMjRzeGwvMjAyMi8wMS8xMS8wNy8xMF8zNV82MWRkMmQ2YmU5ZTgyLmpwZw==/profile:player-960x540',
  1407. },
  1408. },
  1409. {
  1410. # megatvcom:embed
  1411. 'url': 'https://www.in.gr/2021/12/18/greece/apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize/',
  1412. 'info_dict': {
  1413. 'id': 'apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize',
  1414. 'title': 'md5:5e569cf996ec111057c2764ec272848f',
  1415. },
  1416. 'playlist': [{
  1417. 'md5': '1afa26064ff00ccb91617957dbc73dc1',
  1418. 'info_dict': {
  1419. 'ext': 'mp4',
  1420. 'id': '564916',
  1421. 'display_id': 'md5:6cdf22d3a2e7bacb274b7295089a1770',
  1422. 'title': 'md5:33b9dd39584685b62873043670eb52a6',
  1423. 'description': 'md5:c1db7310f390518ac36dd69d947ef1a1',
  1424. 'timestamp': 1639753145,
  1425. 'upload_date': '20211217',
  1426. 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/prezerakos-1024x597.jpg',
  1427. },
  1428. }, {
  1429. 'md5': '4a1c220695f1ef865a8b7966a53e2474',
  1430. 'info_dict': {
  1431. 'ext': 'mp4',
  1432. 'id': '564905',
  1433. 'display_id': 'md5:ead15695e485e649aed2b81ebd699b88',
  1434. 'title': 'md5:2b71fd54249a3ca34609fe39ae31c47b',
  1435. 'description': 'md5:c42e12f638d0a97d6de4508e2c4df982',
  1436. 'timestamp': 1639753047,
  1437. 'upload_date': '20211217',
  1438. 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/tsiodras-mitsotakis-1024x545.jpg',
  1439. },
  1440. }],
  1441. },
  1442. {
  1443. 'url': 'https://www.ertnews.gr/video/manolis-goyalles-o-anthropos-piso-apo-ti-diadiktyaki-vasilopita/',
  1444. 'info_dict': {
  1445. 'id': '2022/tv/news-themata-ianouarios/20220114-apotis6-gouales-pita.mp4',
  1446. 'ext': 'mp4',
  1447. 'title': 'md5:df64f5b61c06d0e9556c0cdd5cf14464',
  1448. 'thumbnail': 'https://www.ert.gr/themata/photos/2021/20220114-apotis6-gouales-pita.jpg',
  1449. },
  1450. },
  1451. {
  1452. # ThePlatform embedded with whitespaces in URLs
  1453. 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
  1454. 'only_matching': True,
  1455. },
  1456. {
  1457. # Senate ISVP iframe https
  1458. 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
  1459. 'md5': 'fb8c70b0b515e5037981a2492099aab8',
  1460. 'info_dict': {
  1461. 'id': 'govtaff020316',
  1462. 'ext': 'mp4',
  1463. 'title': 'Integrated Senate Video Player',
  1464. },
  1465. 'add_ie': ['SenateISVP'],
  1466. },
  1467. {
  1468. # Limelight embeds (1 channel embed + 4 media embeds)
  1469. 'url': 'http://www.sedona.com/FacilitatorTraining2017',
  1470. 'info_dict': {
  1471. 'id': 'FacilitatorTraining2017',
  1472. 'title': 'Facilitator Training 2017',
  1473. },
  1474. 'playlist_mincount': 5,
  1475. },
  1476. {
  1477. # Limelight embed (LimelightPlayerUtil.embed)
  1478. 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
  1479. 'info_dict': {
  1480. 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
  1481. 'ext': 'mp4',
  1482. 'title': '07448641',
  1483. 'timestamp': 1499890639,
  1484. 'upload_date': '20170712',
  1485. },
  1486. 'params': {
  1487. 'skip_download': True,
  1488. },
  1489. 'add_ie': ['LimelightMedia'],
  1490. },
  1491. {
  1492. 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
  1493. 'info_dict': {
  1494. 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
  1495. 'title': 'Standoff with Walnut Creek murder suspect ends',
  1496. 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
  1497. },
  1498. 'playlist_mincount': 4,
  1499. },
  1500. {
  1501. # WashingtonPost embed
  1502. 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
  1503. 'info_dict': {
  1504. 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
  1505. 'ext': 'mp4',
  1506. 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
  1507. '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.',
  1508. 'timestamp': 1455216756,
  1509. 'uploader': 'The Washington Post',
  1510. 'upload_date': '20160211',
  1511. },
  1512. 'add_ie': ['WashingtonPost'],
  1513. },
  1514. {
  1515. # JOJ.sk embeds
  1516. 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1517. 'info_dict': {
  1518. 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1519. 'title': 'Slovenskom sa prehnala vlna silných búrok',
  1520. },
  1521. 'playlist_mincount': 5,
  1522. 'add_ie': ['Joj'],
  1523. },
  1524. {
  1525. # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
  1526. 'url': 'https://tvrain.ru/amp/418921/',
  1527. 'md5': 'cc00413936695987e8de148b67d14f1d',
  1528. 'info_dict': {
  1529. 'id': '418921',
  1530. 'ext': 'mp4',
  1531. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  1532. },
  1533. },
  1534. {
  1535. # multiple HTML5 videos on one page
  1536. 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
  1537. 'info_dict': {
  1538. 'id': 'keyscenarios',
  1539. 'title': 'Rescue Kit 14 Free Edition - Getting started',
  1540. },
  1541. 'playlist_count': 4,
  1542. },
  1543. {
  1544. # vshare embed
  1545. 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
  1546. 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
  1547. 'info_dict': {
  1548. 'id': '0f64ce6',
  1549. 'title': 'vl14062007715967',
  1550. 'ext': 'mp4',
  1551. },
  1552. },
  1553. {
  1554. 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
  1555. 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
  1556. 'info_dict': {
  1557. 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
  1558. 'ext': 'mp4',
  1559. 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
  1560. 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
  1561. 'timestamp': 1474354800,
  1562. 'upload_date': '20160920',
  1563. },
  1564. },
  1565. {
  1566. 'url': 'http://www.kidzworld.com/article/30935-trolls-the-beat-goes-on-interview-skylar-astin-and-amanda-leighton',
  1567. 'info_dict': {
  1568. 'id': '1731611',
  1569. 'ext': 'mp4',
  1570. 'title': 'Official Trailer | TROLLS: THE BEAT GOES ON!',
  1571. 'description': 'md5:eb5f23826a027ba95277d105f248b825',
  1572. 'timestamp': 1516100691,
  1573. 'upload_date': '20180116',
  1574. },
  1575. 'params': {
  1576. 'skip_download': True,
  1577. },
  1578. 'add_ie': ['SpringboardPlatform'],
  1579. },
  1580. {
  1581. 'url': 'https://www.yapfiles.ru/show/1872528/690b05d3054d2dbe1e69523aa21bb3b1.mp4.html',
  1582. 'info_dict': {
  1583. 'id': 'vMDE4NzI1Mjgt690b',
  1584. 'ext': 'mp4',
  1585. 'title': 'Котята',
  1586. },
  1587. 'add_ie': ['YapFiles'],
  1588. 'params': {
  1589. 'skip_download': True,
  1590. },
  1591. },
  1592. {
  1593. # CloudflareStream embed
  1594. 'url': 'https://www.cloudflare.com/products/cloudflare-stream/',
  1595. 'info_dict': {
  1596. 'id': '31c9291ab41fac05471db4e73aa11717',
  1597. 'ext': 'mp4',
  1598. 'title': '31c9291ab41fac05471db4e73aa11717',
  1599. },
  1600. 'add_ie': ['CloudflareStream'],
  1601. 'params': {
  1602. 'skip_download': True,
  1603. },
  1604. },
  1605. {
  1606. # PeerTube embed
  1607. 'url': 'https://joinpeertube.org/fr/home/',
  1608. 'info_dict': {
  1609. 'id': 'home',
  1610. 'title': 'Reprenez le contrôle de vos vidéos ! #JoinPeertube',
  1611. },
  1612. 'playlist_count': 2,
  1613. },
  1614. {
  1615. # Indavideo embed
  1616. 'url': 'https://streetkitchen.hu/receptek/igy_kell_otthon_hamburgert_sutni/',
  1617. 'info_dict': {
  1618. 'id': '1693903',
  1619. 'ext': 'mp4',
  1620. 'title': 'Így kell otthon hamburgert sütni',
  1621. 'description': 'md5:f5a730ecf900a5c852e1e00540bbb0f7',
  1622. 'timestamp': 1426330212,
  1623. 'upload_date': '20150314',
  1624. 'uploader': 'StreetKitchen',
  1625. 'uploader_id': '546363',
  1626. },
  1627. 'add_ie': ['IndavideoEmbed'],
  1628. 'params': {
  1629. 'skip_download': True,
  1630. },
  1631. },
  1632. {
  1633. # APA embed via JWPlatform embed
  1634. 'url': 'http://www.vol.at/blue-man-group/5593454',
  1635. 'info_dict': {
  1636. 'id': 'jjv85FdZ',
  1637. 'ext': 'mp4',
  1638. 'title': '"Blau ist mysteriös": Die Blue Man Group im Interview',
  1639. 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
  1640. 'thumbnail': r're:^https?://.*\.jpg$',
  1641. 'duration': 254,
  1642. 'timestamp': 1519211149,
  1643. 'upload_date': '20180221',
  1644. },
  1645. 'params': {
  1646. 'skip_download': True,
  1647. },
  1648. },
  1649. {
  1650. 'url': 'http://share-videos.se/auto/video/83645793?uid=13',
  1651. 'md5': 'b68d276de422ab07ee1d49388103f457',
  1652. 'info_dict': {
  1653. 'id': '83645793',
  1654. 'title': 'Lock up and get excited',
  1655. 'ext': 'mp4',
  1656. },
  1657. 'skip': 'TODO: fix nested playlists processing in tests',
  1658. },
  1659. {
  1660. # Viqeo embeds
  1661. 'url': 'https://viqeo.tv/',
  1662. 'info_dict': {
  1663. 'id': 'viqeo',
  1664. 'title': 'All-new video platform',
  1665. },
  1666. 'playlist_count': 6,
  1667. },
  1668. # {
  1669. # # Zype embed
  1670. # 'url': 'https://www.cookscountry.com/episode/554-smoky-barbecue-favorites',
  1671. # 'info_dict': {
  1672. # 'id': '5b400b834b32992a310622b9',
  1673. # 'ext': 'mp4',
  1674. # 'title': 'Smoky Barbecue Favorites',
  1675. # 'thumbnail': r're:^https?://.*\.jpe?g',
  1676. # 'description': 'md5:5ff01e76316bd8d46508af26dc86023b',
  1677. # 'upload_date': '20170909',
  1678. # 'timestamp': 1504915200,
  1679. # },
  1680. # 'add_ie': [ZypeIE.ie_key()],
  1681. # 'params': {
  1682. # 'skip_download': True,
  1683. # },
  1684. # },
  1685. {
  1686. # videojs embed
  1687. 'url': 'https://video.sibnet.ru/shell.php?videoid=3422904',
  1688. 'info_dict': {
  1689. 'id': 'shell',
  1690. 'ext': 'mp4',
  1691. 'title': 'Доставщик пиццы спросил разрешения сыграть на фортепиано',
  1692. 'description': 'md5:89209cdc587dab1e4a090453dbaa2cb1',
  1693. 'thumbnail': r're:^https?://.*\.jpg$',
  1694. },
  1695. 'params': {
  1696. 'skip_download': True,
  1697. },
  1698. 'expected_warnings': ['Failed to download MPD manifest'],
  1699. },
  1700. {
  1701. # DailyMotion embed with DM.player
  1702. 'url': 'https://www.beinsports.com/us/copa-del-rey/video/the-locker-room-valencia-beat-barca-in-copa/1203804',
  1703. 'info_dict': {
  1704. 'id': 'k6aKkGHd9FJs4mtJN39',
  1705. 'ext': 'mp4',
  1706. 'title': 'The Locker Room: Valencia Beat Barca In Copa del Rey Final',
  1707. 'description': 'This video is private.',
  1708. 'uploader_id': 'x1jf30l',
  1709. 'uploader': 'beIN SPORTS USA',
  1710. 'upload_date': '20190528',
  1711. 'timestamp': 1559062971,
  1712. },
  1713. 'params': {
  1714. 'skip_download': True,
  1715. },
  1716. },
  1717. {
  1718. # tvopengr:embed
  1719. 'url': 'https://www.ethnos.gr/World/article/190604/hparosiaxekinoynoisynomiliessthgeneyhmethskiatoypolemoypanoapothnoykrania',
  1720. 'md5': 'eb0c3995d0a6f18f6538c8e057865d7d',
  1721. 'info_dict': {
  1722. 'id': '101119',
  1723. 'ext': 'mp4',
  1724. 'display_id': 'oikarpoitondiapragmateyseonhparosias',
  1725. 'title': 'md5:b979f4d640c568617d6547035528a149',
  1726. 'description': 'md5:e54fc1977c7159b01cc11cd7d9d85550',
  1727. 'timestamp': 1641772800,
  1728. 'upload_date': '20220110',
  1729. 'thumbnail': 'https://opentv-static.siliconweb.com/imgHandler/1920/70bc39fa-895b-4918-a364-c39d2135fc6d.jpg',
  1730. },
  1731. },
  1732. {
  1733. # blogger embed
  1734. 'url': 'https://blog.tomeuvizoso.net/2019/01/a-panfrost-milestone.html',
  1735. 'md5': 'f1bc19b6ea1b0fd1d81e84ca9ec467ac',
  1736. 'info_dict': {
  1737. 'id': 'BLOGGER-video-3c740e3a49197e16-796',
  1738. 'ext': 'mp4',
  1739. 'title': 'Blogger',
  1740. 'thumbnail': r're:^https?://.*',
  1741. },
  1742. },
  1743. # {
  1744. # # TODO: find another test
  1745. # # http://schema.org/VideoObject
  1746. # 'url': 'https://flipagram.com/f/nyvTSJMKId',
  1747. # 'md5': '888dcf08b7ea671381f00fab74692755',
  1748. # 'info_dict': {
  1749. # 'id': 'nyvTSJMKId',
  1750. # 'ext': 'mp4',
  1751. # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
  1752. # 'description': '#love for cats.',
  1753. # 'timestamp': 1461244995,
  1754. # 'upload_date': '20160421',
  1755. # },
  1756. # 'params': {
  1757. # 'force_generic_extractor': True,
  1758. # },
  1759. # },
  1760. {
  1761. # VHX Embed
  1762. 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
  1763. 'info_dict': {
  1764. 'id': '858208',
  1765. 'ext': 'mp4',
  1766. 'title': 'Untitled',
  1767. 'uploader_id': 'user80538407',
  1768. 'uploader': 'OTT Videos',
  1769. },
  1770. },
  1771. {
  1772. # ArcPublishing PoWa video player
  1773. 'url': 'https://www.adn.com/politics/2020/11/02/video-senate-candidates-campaign-in-anchorage-on-eve-of-election-day/',
  1774. 'md5': 'b03b2fac8680e1e5a7cc81a5c27e71b3',
  1775. 'info_dict': {
  1776. 'id': '8c99cb6e-b29c-4bc9-9173-7bf9979225ab',
  1777. 'ext': 'mp4',
  1778. 'title': 'Senate candidates wave to voters on Anchorage streets',
  1779. 'description': 'md5:91f51a6511f090617353dc720318b20e',
  1780. 'timestamp': 1604378735,
  1781. 'upload_date': '20201103',
  1782. 'duration': 1581,
  1783. },
  1784. },
  1785. {
  1786. # MyChannels SDK embed
  1787. # https://www.24kitchen.nl/populair/deskundige-dit-waarom-sommigen-gevoelig-zijn-voor-voedselallergieen
  1788. 'url': 'https://www.demorgen.be/nieuws/burgemeester-rotterdam-richt-zich-in-videoboodschap-tot-relschoppers-voelt-het-goed~b0bcfd741/',
  1789. 'md5': '90c0699c37006ef18e198c032d81739c',
  1790. 'info_dict': {
  1791. 'id': '194165',
  1792. 'ext': 'mp4',
  1793. 'title': 'Burgemeester Aboutaleb spreekt relschoppers toe',
  1794. 'timestamp': 1611740340,
  1795. 'upload_date': '20210127',
  1796. 'duration': 159,
  1797. },
  1798. },
  1799. {
  1800. # Simplecast player embed
  1801. 'url': 'https://www.bio.org/podcast',
  1802. 'info_dict': {
  1803. 'id': 'podcast',
  1804. 'title': 'I AM BIO Podcast | BIO',
  1805. },
  1806. 'playlist_mincount': 52,
  1807. }, {
  1808. # WimTv embed player
  1809. 'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
  1810. 'info_dict': {
  1811. 'id': 'wearefmi-pt-2-2021',
  1812. 'title': '#WEAREFMI – PT.2 – 2021 – MsMotorTV',
  1813. },
  1814. 'playlist_count': 1,
  1815. }, {
  1816. # KVS Player
  1817. 'url': 'https://www.kvs-demo.com/videos/105/kelis-4th-of-july/',
  1818. 'info_dict': {
  1819. 'id': '105',
  1820. 'display_id': 'kelis-4th-of-july',
  1821. 'ext': 'mp4',
  1822. 'title': 'Kelis - 4th Of July',
  1823. 'description': 'Kelis - 4th Of July',
  1824. 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
  1825. },
  1826. 'params': {
  1827. 'skip_download': True,
  1828. },
  1829. 'expected_warnings': ['Untested major version'],
  1830. }, {
  1831. # KVS Player
  1832. 'url': 'https://www.kvs-demo.com/embed/105/',
  1833. 'info_dict': {
  1834. 'id': '105',
  1835. 'display_id': 'kelis-4th-of-july',
  1836. 'ext': 'mp4',
  1837. 'title': 'Kelis - 4th Of July / Embed Player',
  1838. 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
  1839. },
  1840. 'params': {
  1841. 'skip_download': True,
  1842. },
  1843. }, {
  1844. 'url': 'https://youix.com/video/leningrad-zoj/',
  1845. 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
  1846. 'info_dict': {
  1847. 'id': '18485',
  1848. 'display_id': 'leningrad-zoj',
  1849. 'ext': 'mp4',
  1850. 'title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',
  1851. 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
  1852. },
  1853. }, {
  1854. # KVS Player
  1855. 'url': 'https://youix.com/embed/18485',
  1856. 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
  1857. 'info_dict': {
  1858. 'id': '18485',
  1859. 'display_id': 'leningrad-zoj',
  1860. 'ext': 'mp4',
  1861. 'title': 'Ленинград - ЗОЖ',
  1862. 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
  1863. },
  1864. }, {
  1865. # KVS Player
  1866. 'url': 'https://bogmedia.org/videos/21217/40-nochey-40-nights-2016/',
  1867. 'md5': '94166bdb26b4cb1fb9214319a629fc51',
  1868. 'info_dict': {
  1869. 'id': '21217',
  1870. 'display_id': '40-nochey-2016',
  1871. 'ext': 'mp4',
  1872. 'title': '40 ночей (2016) - BogMedia.org',
  1873. 'description': 'md5:4e6d7d622636eb7948275432eb256dc3',
  1874. 'thumbnail': 'https://bogmedia.org/contents/videos_screenshots/21000/21217/preview_480p.mp4.jpg',
  1875. },
  1876. },
  1877. {
  1878. # KVS Player (for sites that serve kt_player.js via non-https urls)
  1879. 'url': 'http://www.camhub.world/embed/389508',
  1880. 'md5': 'fbe89af4cfb59c8fd9f34a202bb03e32',
  1881. 'info_dict': {
  1882. 'id': '389508',
  1883. 'display_id': 'syren-de-mer-onlyfans-05-07-2020have-a-happy-safe-holiday5f014e68a220979bdb8cd-source',
  1884. 'ext': 'mp4',
  1885. 'title': 'Syren De Mer onlyfans_05-07-2020Have_a_happy_safe_holiday5f014e68a220979bdb8cd_source / Embed плеер',
  1886. 'thumbnail': r're:https?://www\.camhub\.world/contents/videos_screenshots/389000/389508/preview\.mp4\.jpg',
  1887. },
  1888. },
  1889. {
  1890. # Reddit-hosted video that will redirect and be processed by RedditIE
  1891. # Redirects to https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
  1892. 'url': 'https://v.redd.it/zv89llsvexdz',
  1893. 'md5': '87f5f02f6c1582654146f830f21f8662',
  1894. 'info_dict': {
  1895. 'id': 'zv89llsvexdz',
  1896. 'ext': 'mp4',
  1897. 'timestamp': 1501941939.0,
  1898. 'title': 'That small heart attack.',
  1899. 'upload_date': '20170805',
  1900. 'uploader': 'Antw87',
  1901. },
  1902. },
  1903. {
  1904. # 1080p Reddit-hosted video that will redirect and be processed by RedditIE
  1905. 'url': 'https://v.redd.it/33hgok7dfbz71/',
  1906. 'md5': '7a1d587940242c9bb3bd6eb320b39258',
  1907. 'info_dict': {
  1908. 'id': '33hgok7dfbz71',
  1909. 'ext': 'mp4',
  1910. 'title': "The game Didn't want me to Knife that Guy I guess",
  1911. 'uploader': 'paraf1ve',
  1912. 'timestamp': 1636788683.0,
  1913. 'upload_date': '20211113',
  1914. },
  1915. },
  1916. {
  1917. # MainStreaming player
  1918. 'url': 'https://www.lactv.it/2021/10/03/lac-news24-la-settimana-03-10-2021/',
  1919. 'info_dict': {
  1920. 'id': 'EUlZfGWkGpOd',
  1921. 'title': 'La Settimana ',
  1922. 'description': '03 Ottobre ore 02:00',
  1923. 'ext': 'mp4',
  1924. 'live_status': 'not_live',
  1925. 'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster',
  1926. 'duration': 1512,
  1927. },
  1928. },
  1929. {
  1930. # Multiple gfycat iframe embeds
  1931. 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
  1932. 'info_dict': {
  1933. 'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
  1934. 'id': 'board',
  1935. },
  1936. 'playlist_count': 8,
  1937. },
  1938. {
  1939. # Multiple gfycat gifs (direct links)
  1940. 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
  1941. 'info_dict': {
  1942. 'title': '옳게 된 크롭 니트 스테이씨 아이사',
  1943. 'id': 'board',
  1944. },
  1945. 'playlist_count': 6,
  1946. },
  1947. {
  1948. # Multiple gfycat embeds, with uppercase "IFR" in urls
  1949. 'url': 'https://kkzz.kr/?vid=2295',
  1950. 'info_dict': {
  1951. 'title': '지방시 앰버서더 에스파 카리나 움짤',
  1952. 'id': '?vid=2295',
  1953. },
  1954. 'playlist_count': 9,
  1955. },
  1956. {
  1957. # Panopto embeds
  1958. 'url': 'https://www.monash.edu/learning-teaching/teachhq/learning-technologies/panopto/how-to/insert-a-quiz-into-a-panopto-video',
  1959. 'info_dict': {
  1960. 'ext': 'mp4',
  1961. 'id': '0bd3f16c-824a-436a-8486-ac5900693aef',
  1962. 'title': 'Quizzes in Panopto',
  1963. },
  1964. },
  1965. {
  1966. # Ruutu embed
  1967. 'url': 'https://www.nelonen.fi/ohjelmat/madventures-suomi/2160731-riku-ja-tunna-lahtevat-peurajahtiin-tv-sta-tutun-biologin-kanssa---metsastysreissu-huipentuu-kasvissyojan-painajaiseen',
  1968. 'md5': 'a2513a98d3496099e6eced40f7e6a14b',
  1969. 'info_dict': {
  1970. 'id': '4044426',
  1971. 'ext': 'mp4',
  1972. 'title': 'Riku ja Tunna lähtevät peurajahtiin tv:stä tutun biologin kanssa – metsästysreissu huipentuu kasvissyöjän painajaiseen!',
  1973. 'thumbnail': r're:^https?://.+\.jpg$',
  1974. 'duration': 108,
  1975. 'series': 'Madventures Suomi',
  1976. 'description': 'md5:aa55b44bd06a1e337a6f1d0b46507381',
  1977. 'categories': ['Matkailu', 'Elämäntyyli'],
  1978. 'age_limit': 0,
  1979. 'upload_date': '20220308',
  1980. },
  1981. },
  1982. {
  1983. # Multiple Ruutu embeds
  1984. 'url': 'https://www.hs.fi/kotimaa/art-2000008762560.html',
  1985. 'info_dict': {
  1986. 'title': 'Koronavirus | Epidemiahuippu voi olla Suomessa ohi, mutta koronaviruksen poistamista yleisvaarallisten tautien joukosta harkitaan vasta syksyllä',
  1987. 'id': 'art-2000008762560',
  1988. },
  1989. 'playlist_count': 3,
  1990. },
  1991. {
  1992. # Ruutu embed in hs.fi with a single video
  1993. 'url': 'https://www.hs.fi/kotimaa/art-2000008793421.html',
  1994. 'md5': 'f8964e65d8fada6e8a562389bf366bb4',
  1995. 'info_dict': {
  1996. 'id': '4081841',
  1997. 'ext': 'mp4',
  1998. 'title': 'Puolustusvoimat siirsi panssariajoneuvoja harjoituksiin Niinisaloon 2.5.2022',
  1999. 'thumbnail': r're:^https?://.+\.jpg$',
  2000. 'duration': 138,
  2001. 'age_limit': 0,
  2002. 'upload_date': '20220504',
  2003. },
  2004. },
  2005. {
  2006. # Webpage contains double BOM
  2007. 'url': 'https://www.filmarkivet.se/movies/paris-d-moll/',
  2008. 'md5': 'df02cadc719dcc63d43288366f037754',
  2009. 'info_dict': {
  2010. 'id': 'paris-d-moll',
  2011. 'ext': 'mp4',
  2012. 'upload_date': '20220518',
  2013. 'title': 'Paris d-moll',
  2014. 'description': 'md5:319e37ea5542293db37e1e13072fe330',
  2015. 'thumbnail': 'https://www.filmarkivet.se/wp-content/uploads/parisdmoll2.jpg',
  2016. 'timestamp': 1652833414,
  2017. 'age_limit': 0,
  2018. },
  2019. },
  2020. {
  2021. 'url': 'https://www.mollymovieclub.com/p/interstellar?s=r#details',
  2022. 'md5': '198bde8bed23d0b23c70725c83c9b6d9',
  2023. 'info_dict': {
  2024. 'id': '53602801',
  2025. 'ext': 'mpga',
  2026. 'title': 'Interstellar',
  2027. 'description': 'Listen now | Episode One',
  2028. 'thumbnail': 'md5:c30d9c83f738e16d8551d7219d321538',
  2029. 'uploader': 'Molly Movie Club',
  2030. 'uploader_id': '839621',
  2031. },
  2032. },
  2033. {
  2034. 'url': 'https://www.blockedandreported.org/p/episode-117-lets-talk-about-depp?s=r',
  2035. 'md5': 'c0cc44ee7415daeed13c26e5b56d6aa0',
  2036. 'info_dict': {
  2037. 'id': '57962052',
  2038. 'ext': 'mpga',
  2039. 'title': 'md5:855b2756f0ee10f6723fa00b16266f8d',
  2040. 'description': 'md5:fe512a5e94136ad260c80bde00ea4eef',
  2041. 'thumbnail': 'md5:2218f27dfe517bb5ac16c47d0aebac59',
  2042. 'uploader': 'Blocked and Reported',
  2043. 'uploader_id': '500230',
  2044. },
  2045. },
  2046. {
  2047. 'url': 'https://www.skimag.com/video/ski-people-1980/',
  2048. 'md5': '022a7e31c70620ebec18deeab376ee03',
  2049. 'info_dict': {
  2050. 'id': 'YTmgRiNU',
  2051. 'ext': 'mp4',
  2052. 'title': '1980 Ski People',
  2053. 'timestamp': 1610407738,
  2054. 'description': 'md5:cf9c3d101452c91e141f292b19fe4843',
  2055. 'thumbnail': 'https://cdn.jwplayer.com/v2/media/YTmgRiNU/poster.jpg?width=720',
  2056. 'duration': 5688.0,
  2057. 'upload_date': '20210111',
  2058. },
  2059. },
  2060. {
  2061. 'note': 'JSON LD with multiple @type',
  2062. 'url': 'https://www.nu.nl/280161/video/hoe-een-bladvlo-dit-verwoestende-japanse-onkruid-moet-vernietigen.html',
  2063. 'md5': 'c7949f34f57273013fb7ccb1156393db',
  2064. 'info_dict': {
  2065. 'id': 'ipy2AcGL',
  2066. 'ext': 'mp4',
  2067. 'description': 'md5:6a9d644bab0dc2dc06849c2505d8383d',
  2068. 'thumbnail': r're:https://media\.nu\.nl/m/.+\.jpg',
  2069. 'title': 'Hoe een bladvlo dit verwoestende Japanse onkruid moet vernietigen',
  2070. 'timestamp': 1586577474,
  2071. 'upload_date': '20200411',
  2072. 'age_limit': 0,
  2073. 'duration': 111.0,
  2074. },
  2075. },
  2076. {
  2077. 'note': 'JSON LD with unexpected data type',
  2078. 'url': 'https://www.autoweek.nl/autotests/artikel/porsche-911-gt3-rs-rij-impressie-2/',
  2079. 'info_dict': {
  2080. 'id': 'porsche-911-gt3-rs-rij-impressie-2',
  2081. 'ext': 'mp4',
  2082. 'title': 'Test: Porsche 911 GT3 RS',
  2083. 'description': 'Je ziet het niet, maar het is er wel. Downforce, hebben we het dan over. En in de nieuwe Porsche 911 GT3 RS is er zelfs heel veel downforce.',
  2084. 'timestamp': 1664920902,
  2085. 'upload_date': '20221004',
  2086. 'thumbnail': r're:^https://media.autoweek.nl/m/.+\.jpg$',
  2087. 'age_limit': 0,
  2088. 'direct': True,
  2089. },
  2090. },
  2091. {
  2092. 'note': 'server returns data in brotli compression by default if `accept-encoding: *` is specified.',
  2093. 'url': 'https://www.extra.cz/cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
  2094. 'info_dict': {
  2095. 'id': 'cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
  2096. 'ext': 'mp4',
  2097. 'title': 'čauky lidi 70 finall',
  2098. 'description': 'čauky lidi 70 finall',
  2099. 'thumbnail': 'h',
  2100. 'upload_date': '20220606',
  2101. 'timestamp': 1654513791,
  2102. 'duration': 318.0,
  2103. 'direct': True,
  2104. 'age_limit': 0,
  2105. },
  2106. },
  2107. {
  2108. 'url': 'https://shooshtime.com/videos/284002/just-out-of-the-shower-joi/',
  2109. 'md5': 'e2f0a4c329f7986280b7328e24036d60',
  2110. 'info_dict': {
  2111. 'id': '284002',
  2112. 'display_id': 'just-out-of-the-shower-joi',
  2113. 'ext': 'mp4',
  2114. 'title': 'Just Out Of The Shower JOI - Shooshtime',
  2115. 'thumbnail': 'https://i.shoosh.co/contents/videos_screenshots/284000/284002/preview.mp4.jpg',
  2116. 'height': 720,
  2117. 'age_limit': 18,
  2118. },
  2119. },
  2120. {
  2121. 'note': 'Live HLS direct link',
  2122. 'url': 'https://d18j67ugtrocuq.cloudfront.net/out/v1/2767aec339144787926bd0322f72c6e9/index.m3u8',
  2123. 'info_dict': {
  2124. 'id': 'index',
  2125. 'title': r're:index',
  2126. 'ext': 'mp4',
  2127. 'live_status': 'is_live',
  2128. },
  2129. 'params': {
  2130. 'skip_download': 'm3u8',
  2131. },
  2132. },
  2133. {
  2134. 'note': 'Video.js VOD HLS',
  2135. 'url': 'https://gist.githubusercontent.com/bashonly/2aae0862c50f4a4b84f220c315767208/raw/e3380d413749dabbe804c9c2d8fd9a45142475c7/videojs_hls_test.html',
  2136. 'info_dict': {
  2137. 'id': 'videojs_hls_test',
  2138. 'title': 'video',
  2139. 'ext': 'mp4',
  2140. 'age_limit': 0,
  2141. 'duration': 1800,
  2142. },
  2143. 'params': {
  2144. 'skip_download': 'm3u8',
  2145. },
  2146. },
  2147. ]
  2148. def report_following_redirect(self, new_url):
  2149. """Report information extraction."""
  2150. self._downloader.to_screen(f'[redirect] Following redirect to {new_url}')
  2151. def report_detected(self, name, num=1, note=None):
  2152. if num > 1:
  2153. name += 's'
  2154. elif not num:
  2155. return
  2156. else:
  2157. num = 'a'
  2158. self._downloader.write_debug(f'Identified {num} {name}{format_field(note, None, "; %s")}')
  2159. def _extra_manifest_info(self, info, manifest_url):
  2160. fragment_query = self._configuration_arg('fragment_query', [None], casesense=True)[0]
  2161. if fragment_query is not None:
  2162. info['extra_param_to_segment_url'] = (
  2163. urllib.parse.urlparse(fragment_query).query or fragment_query
  2164. or urllib.parse.urlparse(manifest_url).query or None)
  2165. key_query = self._configuration_arg('key_query', [None], casesense=True)[0]
  2166. if key_query is not None:
  2167. info['extra_param_to_key_url'] = (
  2168. urllib.parse.urlparse(key_query).query or key_query
  2169. or urllib.parse.urlparse(manifest_url).query or None)
  2170. def hex_or_none(value):
  2171. return value if re.fullmatch(r'(0x)?[\da-f]+', value, re.IGNORECASE) else None
  2172. info['hls_aes'] = traverse_obj(self._configuration_arg('hls_key', casesense=True), {
  2173. 'uri': (0, {url_or_none}), 'key': (0, {hex_or_none}), 'iv': (1, {hex_or_none}),
  2174. }) or None
  2175. variant_query = self._configuration_arg('variant_query', [None], casesense=True)[0]
  2176. if variant_query is not None:
  2177. query = urllib.parse.parse_qs(
  2178. urllib.parse.urlparse(variant_query).query or variant_query
  2179. or urllib.parse.urlparse(manifest_url).query)
  2180. for fmt in self._downloader._get_formats(info):
  2181. fmt['url'] = update_url_query(fmt['url'], query)
  2182. # Attempt to detect live HLS or set VOD duration
  2183. m3u8_format = next((f for f in self._downloader._get_formats(info)
  2184. if determine_protocol(f) == 'm3u8_native'), None)
  2185. if m3u8_format:
  2186. is_live = self._configuration_arg('is_live', [None])[0]
  2187. if is_live is not None:
  2188. info['live_status'] = 'not_live' if is_live == 'false' else 'is_live'
  2189. return
  2190. headers = m3u8_format.get('http_headers') or info.get('http_headers')
  2191. duration = self._extract_m3u8_vod_duration(
  2192. m3u8_format['url'], info.get('id'), note='Checking m3u8 live status',
  2193. errnote='Failed to download m3u8 media playlist', headers=headers)
  2194. if not duration:
  2195. info['live_status'] = 'is_live'
  2196. info['duration'] = info.get('duration') or duration
  2197. def _extract_rss(self, url, video_id, doc):
  2198. NS_MAP = {
  2199. 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
  2200. }
  2201. entries = []
  2202. for it in doc.findall('./channel/item'):
  2203. next_url = next(
  2204. (e.attrib.get('url') for e in it.findall('./enclosure')),
  2205. xpath_text(it, 'link', fatal=False))
  2206. if not next_url:
  2207. continue
  2208. guid = try_call(lambda: it.find('guid').text)
  2209. if guid:
  2210. next_url = smuggle_url(next_url, {'force_videoid': guid})
  2211. def itunes(key):
  2212. return xpath_text(it, xpath_with_ns(f'./itunes:{key}', NS_MAP), default=None)
  2213. entries.append({
  2214. '_type': 'url_transparent',
  2215. 'url': next_url,
  2216. 'title': try_call(lambda: it.find('title').text),
  2217. 'description': xpath_text(it, 'description', default=None),
  2218. 'timestamp': unified_timestamp(xpath_text(it, 'pubDate', default=None)),
  2219. 'duration': parse_duration(itunes('duration')),
  2220. 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
  2221. 'episode': itunes('title'),
  2222. 'episode_number': int_or_none(itunes('episode')),
  2223. 'season_number': int_or_none(itunes('season')),
  2224. 'age_limit': {'true': 18, 'yes': 18, 'false': 0, 'no': 0}.get((itunes('explicit') or '').lower()),
  2225. })
  2226. return {
  2227. '_type': 'playlist',
  2228. 'id': url,
  2229. 'title': try_call(lambda: doc.find('./channel/title').text),
  2230. 'description': try_call(lambda: doc.find('./channel/description').text),
  2231. 'entries': entries,
  2232. }
  2233. @classmethod
  2234. def _kvs_get_real_url(cls, video_url, license_code):
  2235. if not video_url.startswith('function/0/'):
  2236. return video_url # not obfuscated
  2237. parsed = urllib.parse.urlparse(video_url[len('function/0/'):])
  2238. license_token = cls._kvs_get_license_token(license_code)
  2239. urlparts = parsed.path.split('/')
  2240. HASH_LENGTH = 32
  2241. hash_ = urlparts[3][:HASH_LENGTH]
  2242. indices = list(range(HASH_LENGTH))
  2243. # Swap indices of hash according to the destination calculated from the license token
  2244. accum = 0
  2245. for src in reversed(range(HASH_LENGTH)):
  2246. accum += license_token[src]
  2247. dest = (src + accum) % HASH_LENGTH
  2248. indices[src], indices[dest] = indices[dest], indices[src]
  2249. urlparts[3] = ''.join(hash_[index] for index in indices) + urlparts[3][HASH_LENGTH:]
  2250. return urllib.parse.urlunparse(parsed._replace(path='/'.join(urlparts)))
  2251. @staticmethod
  2252. def _kvs_get_license_token(license_code):
  2253. license_code = license_code.replace('$', '')
  2254. license_values = [int(char) for char in license_code]
  2255. modlicense = license_code.replace('0', '1')
  2256. center = len(modlicense) // 2
  2257. fronthalf = int(modlicense[:center + 1])
  2258. backhalf = int(modlicense[center:])
  2259. modlicense = str(4 * abs(fronthalf - backhalf))[:center + 1]
  2260. return [
  2261. (license_values[index + offset] + current) % 10
  2262. for index, current in enumerate(map(int, modlicense))
  2263. for offset in range(4)
  2264. ]
  2265. def _extract_kvs(self, url, webpage, video_id):
  2266. flashvars = self._search_json(
  2267. r'(?s:<script\b[^>]*>.*?var\s+flashvars\s*=)',
  2268. webpage, 'flashvars', video_id, transform_source=js_to_json)
  2269. # extract the part after the last / as the display_id from the
  2270. # canonical URL.
  2271. display_id = self._search_regex(
  2272. r'(?:<link href="https?://[^"]+/(.+?)/?" rel="canonical"\s*/?>'
  2273. r'|<link rel="canonical" href="https?://[^"]+/(.+?)/?"\s*/?>)',
  2274. webpage, 'display_id', fatal=False)
  2275. title = self._html_search_regex(r'<(?:h1|title)>(?:Video: )?(.+?)</(?:h1|title)>', webpage, 'title')
  2276. thumbnail = flashvars['preview_url']
  2277. if thumbnail.startswith('//'):
  2278. protocol, _, _ = url.partition('/')
  2279. thumbnail = protocol + thumbnail
  2280. url_keys = list(filter(re.compile(r'^video_(?:url|alt_url\d*)$').match, flashvars.keys()))
  2281. formats = []
  2282. for key in url_keys:
  2283. if '/get_file/' not in flashvars[key]:
  2284. continue
  2285. format_id = flashvars.get(f'{key}_text', key)
  2286. formats.append({
  2287. 'url': urljoin(url, self._kvs_get_real_url(flashvars[key], flashvars['license_code'])),
  2288. 'format_id': format_id,
  2289. 'ext': 'mp4',
  2290. **(parse_resolution(format_id) or parse_resolution(flashvars[key])),
  2291. 'http_headers': {'Referer': url},
  2292. })
  2293. if not formats[-1].get('height'):
  2294. formats[-1]['quality'] = 1
  2295. return {
  2296. 'id': flashvars['video_id'],
  2297. 'display_id': display_id,
  2298. 'title': title,
  2299. 'thumbnail': urljoin(url, thumbnail),
  2300. 'formats': formats,
  2301. }
  2302. def _real_extract(self, url):
  2303. if url.startswith('//'):
  2304. return self.url_result(self.http_scheme() + url)
  2305. parsed_url = urllib.parse.urlparse(url)
  2306. if not parsed_url.scheme:
  2307. default_search = self.get_param('default_search')
  2308. if default_search is None:
  2309. default_search = 'fixup_error'
  2310. if default_search in ('auto', 'auto_warning', 'fixup_error'):
  2311. if re.match(r'[^\s/]+\.[^\s/]+/', url):
  2312. self.report_warning('The url doesn\'t specify the protocol, trying with http')
  2313. return self.url_result('http://' + url)
  2314. elif default_search != 'fixup_error':
  2315. if default_search == 'auto_warning':
  2316. if re.match(r'^(?:url|URL)$', url):
  2317. raise ExtractorError(
  2318. f'Invalid URL: {url!r} . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ',
  2319. expected=True)
  2320. else:
  2321. self.report_warning(
  2322. f'Falling back to youtube search for {url} . Set --default-search "auto" to suppress this warning.')
  2323. return self.url_result('ytsearch:' + url)
  2324. if default_search in ('error', 'fixup_error'):
  2325. raise ExtractorError(
  2326. f'{url!r} is not a valid URL. '
  2327. f'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:{url}" ) to search YouTube', expected=True)
  2328. else:
  2329. if ':' not in default_search:
  2330. default_search += ':'
  2331. return self.url_result(default_search + url)
  2332. original_url = url
  2333. url, smuggled_data = unsmuggle_url(url, {})
  2334. force_videoid = None
  2335. is_intentional = smuggled_data.get('to_generic')
  2336. if 'force_videoid' in smuggled_data:
  2337. force_videoid = smuggled_data['force_videoid']
  2338. video_id = force_videoid
  2339. else:
  2340. video_id = self._generic_id(url)
  2341. # Do not impersonate by default; see https://github.com/yt-dlp/yt-dlp/issues/11335
  2342. impersonate = self._configuration_arg('impersonate', ['false'])
  2343. if 'false' in impersonate:
  2344. impersonate = None
  2345. # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
  2346. # making it impossible to download only chunk of the file (yet we need only 512kB to
  2347. # test whether it's HTML or not). According to yt-dlp default Accept-Encoding
  2348. # that will always result in downloading the whole file that is not desirable.
  2349. # Therefore for extraction pass we have to override Accept-Encoding to any in order
  2350. # to accept raw bytes and being able to download only a chunk.
  2351. # It may probably better to solve this by checking Content-Type for application/octet-stream
  2352. # after a HEAD request, but not sure if we can rely on this.
  2353. try:
  2354. full_response = self._request_webpage(url, video_id, headers=filter_dict({
  2355. 'Accept-Encoding': 'identity',
  2356. 'Referer': smuggled_data.get('referer'),
  2357. }), impersonate=impersonate)
  2358. except ExtractorError as e:
  2359. if not (isinstance(e.cause, HTTPError) and e.cause.status == 403
  2360. and e.cause.response.get_header('cf-mitigated') == 'challenge'
  2361. and e.cause.response.extensions.get('impersonate') is None):
  2362. raise
  2363. cf_cookie_domain = traverse_obj(
  2364. LenientSimpleCookie(e.cause.response.get_header('set-cookie')),
  2365. ('__cf_bm', 'domain'))
  2366. if cf_cookie_domain:
  2367. self.write_debug(f'Clearing __cf_bm cookie for {cf_cookie_domain}')
  2368. self.cookiejar.clear(domain=cf_cookie_domain, path='/', name='__cf_bm')
  2369. msg = 'Got HTTP Error 403 caused by Cloudflare anti-bot challenge; '
  2370. if not self._downloader._impersonate_target_available(ImpersonateTarget()):
  2371. msg += ('see https://github.com/yt-dlp/yt-dlp#impersonation for '
  2372. 'how to install the required impersonation dependency, and ')
  2373. raise ExtractorError(
  2374. f'{msg}try again with --extractor-args "generic:impersonate"', expected=True)
  2375. new_url = full_response.url
  2376. if new_url != extract_basic_auth(url)[0]:
  2377. self.report_following_redirect(new_url)
  2378. if force_videoid:
  2379. new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
  2380. return self.url_result(new_url)
  2381. info_dict = {
  2382. 'id': video_id,
  2383. 'title': self._generic_title(url),
  2384. 'timestamp': unified_timestamp(full_response.headers.get('Last-Modified')),
  2385. }
  2386. # Check for direct link to a video
  2387. content_type = full_response.headers.get('Content-Type', '').lower()
  2388. m = re.match(r'(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
  2389. if m:
  2390. self.report_detected('direct video link')
  2391. headers = filter_dict({'Referer': smuggled_data.get('referer')})
  2392. format_id = str(m.group('format_id'))
  2393. ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
  2394. subtitles = {}
  2395. if format_id.endswith('mpegurl') or ext == 'm3u8':
  2396. formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
  2397. elif format_id.endswith(('mpd', 'dash+xml')) or ext == 'mpd':
  2398. formats, subtitles = self._extract_mpd_formats_and_subtitles(url, video_id, headers=headers)
  2399. elif format_id == 'f4m' or ext == 'f4m':
  2400. formats = self._extract_f4m_formats(url, video_id, headers=headers)
  2401. else:
  2402. formats = [{
  2403. 'format_id': format_id,
  2404. 'url': url,
  2405. 'ext': ext,
  2406. 'vcodec': 'none' if m.group('type') == 'audio' else None,
  2407. }]
  2408. info_dict['direct'] = True
  2409. info_dict.update({
  2410. 'formats': formats,
  2411. 'subtitles': subtitles,
  2412. 'http_headers': headers or None,
  2413. })
  2414. self._extra_manifest_info(info_dict, url)
  2415. return info_dict
  2416. if not self.get_param('test', False) and not is_intentional:
  2417. force = self.get_param('force_generic_extractor', False)
  2418. self.report_warning('%s generic information extractor' % ('Forcing' if force else 'Falling back on'))
  2419. first_bytes = full_response.read(512)
  2420. # Is it an M3U playlist?
  2421. if first_bytes.startswith(b'#EXTM3U'):
  2422. self.report_detected('M3U playlist')
  2423. info_dict['formats'], info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
  2424. self._extra_manifest_info(info_dict, url)
  2425. return info_dict
  2426. # Maybe it's a direct link to a video?
  2427. # Be careful not to download the whole thing!
  2428. if not is_html(first_bytes):
  2429. self.report_warning(
  2430. 'URL could be a direct video link, returning it as such.')
  2431. ext = determine_ext(url)
  2432. if ext not in _UnsafeExtensionError.ALLOWED_EXTENSIONS:
  2433. ext = 'unknown_video'
  2434. info_dict.update({
  2435. 'direct': True,
  2436. 'url': url,
  2437. 'ext': ext,
  2438. })
  2439. return info_dict
  2440. webpage = self._webpage_read_content(
  2441. full_response, url, video_id, prefix=first_bytes)
  2442. if '<title>DPG Media Privacy Gate</title>' in webpage:
  2443. webpage = self._download_webpage(url, video_id)
  2444. self.report_extraction(video_id)
  2445. # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
  2446. try:
  2447. try:
  2448. doc = compat_etree_fromstring(webpage)
  2449. except xml.etree.ElementTree.ParseError:
  2450. doc = compat_etree_fromstring(webpage.encode())
  2451. if doc.tag == 'rss':
  2452. self.report_detected('RSS feed')
  2453. return self._extract_rss(url, video_id, doc)
  2454. elif doc.tag == 'SmoothStreamingMedia':
  2455. info_dict['formats'], info_dict['subtitles'] = self._parse_ism_formats_and_subtitles(doc, url)
  2456. self.report_detected('ISM manifest')
  2457. return info_dict
  2458. elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
  2459. smil = self._parse_smil(doc, url, video_id)
  2460. self.report_detected('SMIL file')
  2461. return smil
  2462. elif doc.tag == '{http://xspf.org/ns/0/}playlist':
  2463. self.report_detected('XSPF playlist')
  2464. return self.playlist_result(
  2465. self._parse_xspf(
  2466. doc, video_id, xspf_url=url,
  2467. xspf_base_url=full_response.url),
  2468. video_id)
  2469. elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
  2470. info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles(
  2471. doc,
  2472. mpd_base_url=full_response.url.rpartition('/')[0],
  2473. mpd_url=url)
  2474. self._extra_manifest_info(info_dict, url)
  2475. self.report_detected('DASH manifest')
  2476. return info_dict
  2477. elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
  2478. info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
  2479. self.report_detected('F4M manifest')
  2480. return info_dict
  2481. except xml.etree.ElementTree.ParseError:
  2482. pass
  2483. info_dict.update({
  2484. # it's tempting to parse this further, but you would
  2485. # have to take into account all the variations like
  2486. # Video Title - Site Name
  2487. # Site Name | Video Title
  2488. # Video Title - Tagline | Site Name
  2489. # and so on and so forth; it's just not practical
  2490. 'title': self._generic_title('', webpage, default='video'),
  2491. 'description': self._og_search_description(webpage, default=None),
  2492. 'thumbnail': self._og_search_thumbnail(webpage, default=None),
  2493. 'age_limit': self._rta_search(webpage),
  2494. })
  2495. self._downloader.write_debug('Looking for embeds')
  2496. embeds = list(self._extract_embeds(original_url, webpage, urlh=full_response, info_dict=info_dict))
  2497. if len(embeds) == 1:
  2498. return merge_dicts(embeds[0], info_dict)
  2499. elif embeds:
  2500. return self.playlist_result(embeds, **info_dict)
  2501. raise UnsupportedError(url)
  2502. def _extract_embeds(self, url, webpage, *, urlh=None, info_dict={}):
  2503. """Returns an iterator of video entries"""
  2504. info_dict = types.MappingProxyType(info_dict) # Prevents accidental mutation
  2505. video_id = traverse_obj(info_dict, 'display_id', 'id') or self._generic_id(url)
  2506. url, smuggled_data = unsmuggle_url(url, {})
  2507. actual_url = urlh.url if urlh else url
  2508. # Sometimes embedded video player is hidden behind percent encoding
  2509. # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448)
  2510. # Unescaping the whole page allows to handle those cases in a generic way
  2511. # FIXME: unescaping the whole page may break URLs, commenting out for now.
  2512. # There probably should be a second run of generic extractor on unescaped webpage.
  2513. # webpage = urllib.parse.unquote(webpage)
  2514. embeds = []
  2515. for ie in self._downloader._ies.values():
  2516. if ie.ie_key() in smuggled_data.get('block_ies', []):
  2517. continue
  2518. gen = ie.extract_from_webpage(self._downloader, url, webpage)
  2519. current_embeds = []
  2520. try:
  2521. while True:
  2522. current_embeds.append(next(gen))
  2523. except self.StopExtraction:
  2524. self.report_detected(f'{ie.IE_NAME} exclusive embed', len(current_embeds),
  2525. embeds and 'discarding other embeds')
  2526. return current_embeds
  2527. except StopIteration:
  2528. self.report_detected(f'{ie.IE_NAME} embed', len(current_embeds))
  2529. embeds.extend(current_embeds)
  2530. if embeds:
  2531. return embeds
  2532. jwplayer_data = self._find_jwplayer_data(
  2533. webpage, video_id, transform_source=js_to_json)
  2534. if jwplayer_data:
  2535. if isinstance(jwplayer_data.get('playlist'), str):
  2536. self.report_detected('JW Player playlist')
  2537. return [self.url_result(jwplayer_data['playlist'], 'JWPlatform')]
  2538. try:
  2539. info = self._parse_jwplayer_data(
  2540. jwplayer_data, video_id, require_title=False, base_url=url)
  2541. if traverse_obj(info, 'formats', ('entries', ..., 'formats')):
  2542. self.report_detected('JW Player data')
  2543. return [info]
  2544. except ExtractorError:
  2545. # See https://github.com/ytdl-org/youtube-dl/pull/16735
  2546. pass
  2547. # Video.js embed
  2548. mobj = re.search(
  2549. r'(?s)\bvideojs\s*\(.+?([a-zA-Z0-9_$]+)\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
  2550. webpage)
  2551. if mobj is not None:
  2552. varname = mobj.group(1)
  2553. sources = variadic(self._parse_json(
  2554. mobj.group(2), video_id, transform_source=js_to_json, fatal=False) or [])
  2555. formats, subtitles, src = [], {}, None
  2556. for source in sources:
  2557. src = source.get('src')
  2558. if not src or not isinstance(src, str):
  2559. continue
  2560. src = urllib.parse.urljoin(url, src)
  2561. src_type = source.get('type')
  2562. if isinstance(src_type, str):
  2563. src_type = src_type.lower()
  2564. ext = determine_ext(src).lower()
  2565. if src_type == 'video/youtube':
  2566. return [self.url_result(src, YoutubeIE.ie_key())]
  2567. if src_type == 'application/dash+xml' or ext == 'mpd':
  2568. fmts, subs = self._extract_mpd_formats_and_subtitles(
  2569. src, video_id, mpd_id='dash', fatal=False)
  2570. formats.extend(fmts)
  2571. self._merge_subtitles(subs, target=subtitles)
  2572. elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
  2573. fmts, subs = self._extract_m3u8_formats_and_subtitles(
  2574. src, video_id, 'mp4', entry_protocol='m3u8_native',
  2575. m3u8_id='hls', fatal=False)
  2576. formats.extend(fmts)
  2577. self._merge_subtitles(subs, target=subtitles)
  2578. if not formats:
  2579. formats.append({
  2580. 'url': src,
  2581. 'ext': (mimetype2ext(src_type)
  2582. or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
  2583. 'http_headers': {
  2584. 'Referer': actual_url,
  2585. },
  2586. })
  2587. # https://docs.videojs.com/player#addRemoteTextTrack
  2588. # https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
  2589. for sub_match in re.finditer(rf'(?s){re.escape(varname)}' + r'\.addRemoteTextTrack\(({.+?})\s*,\s*(?:true|false)\)', webpage):
  2590. sub = self._parse_json(
  2591. sub_match.group(1), video_id, transform_source=js_to_json, fatal=False) or {}
  2592. sub_src = str_or_none(sub.get('src'))
  2593. if not sub_src:
  2594. continue
  2595. subtitles.setdefault(dict_get(sub, ('language', 'srclang')) or 'und', []).append({
  2596. 'url': urllib.parse.urljoin(url, sub_src),
  2597. 'name': sub.get('label'),
  2598. 'http_headers': {
  2599. 'Referer': actual_url,
  2600. },
  2601. })
  2602. if formats or subtitles:
  2603. self.report_detected('video.js embed')
  2604. info_dict = {'formats': formats, 'subtitles': subtitles}
  2605. if formats:
  2606. self._extra_manifest_info(info_dict, src)
  2607. return [info_dict]
  2608. # Look for generic KVS player (before json-ld bc of some urls that break otherwise)
  2609. found = self._search_regex((
  2610. r'<script\b[^>]+?\bsrc\s*=\s*(["\'])https?://(?:(?!\1)[^?#])+/kt_player\.js\?v=(?P<ver>\d+(?:\.\d+)+)\1[^>]*>',
  2611. r'kt_player\s*\(\s*(["\'])(?:(?!\1)[\w\W])+\1\s*,\s*(["\'])https?://(?:(?!\2)[^?#])+/kt_player\.swf\?v=(?P<ver>\d+(?:\.\d+)+)\2\s*,',
  2612. ), webpage, 'KVS player', group='ver', default=False)
  2613. if found:
  2614. self.report_detected('KVS Player')
  2615. if found.split('.')[0] not in ('4', '5', '6'):
  2616. self.report_warning(f'Untested major version ({found}) in player engine - download may fail.')
  2617. return [self._extract_kvs(url, webpage, video_id)]
  2618. # Looking for http://schema.org/VideoObject
  2619. json_ld = self._search_json_ld(webpage, video_id, default={})
  2620. if json_ld.get('url') not in (url, None):
  2621. self.report_detected('JSON LD')
  2622. is_direct = json_ld.get('ext') not in (None, *MEDIA_EXTENSIONS.manifests)
  2623. return [merge_dicts({
  2624. '_type': 'video' if is_direct else 'url_transparent',
  2625. 'url': smuggle_url(json_ld['url'], {
  2626. 'force_videoid': video_id,
  2627. 'to_generic': True,
  2628. 'referer': url,
  2629. }),
  2630. }, json_ld)]
  2631. def check_video(vurl):
  2632. if YoutubeIE.suitable(vurl):
  2633. return True
  2634. if RtmpIE.suitable(vurl):
  2635. return True
  2636. vpath = urllib.parse.urlparse(vurl).path
  2637. vext = determine_ext(vpath, None)
  2638. return vext not in (None, 'swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
  2639. def filter_video(urls):
  2640. return list(filter(check_video, urls))
  2641. # Start with something easy: JW Player in SWFObject
  2642. found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
  2643. if found:
  2644. self.report_detected('JW Player in SFWObject')
  2645. else:
  2646. # Look for gorilla-vid style embedding
  2647. found = filter_video(re.findall(r'''(?sx)
  2648. (?:
  2649. jw_plugins|
  2650. JWPlayerOptions|
  2651. jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
  2652. )
  2653. .*?
  2654. ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
  2655. if found:
  2656. self.report_detected('JW Player embed')
  2657. if not found:
  2658. # Broaden the search a little bit
  2659. found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
  2660. if found:
  2661. self.report_detected('video file')
  2662. if not found:
  2663. # Broaden the findall a little bit: JWPlayer JS loader
  2664. found = filter_video(re.findall(
  2665. r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
  2666. if found:
  2667. self.report_detected('JW Player JS loader')
  2668. if not found:
  2669. # Flow player
  2670. found = filter_video(re.findall(r'''(?xs)
  2671. flowplayer\("[^"]+",\s*
  2672. \{[^}]+?\}\s*,
  2673. \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
  2674. ["']?url["']?\s*:\s*["']([^"']+)["']
  2675. ''', webpage))
  2676. if found:
  2677. self.report_detected('Flow Player')
  2678. if not found:
  2679. # Cinerama player
  2680. found = re.findall(
  2681. r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
  2682. if found:
  2683. self.report_detected('Cinerama player')
  2684. if not found:
  2685. # Try to find twitter cards info
  2686. # twitter:player:stream should be checked before twitter:player since
  2687. # it is expected to contain a raw stream (see
  2688. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2689. found = filter_video(re.findall(
  2690. r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
  2691. if found:
  2692. self.report_detected('Twitter card')
  2693. if not found:
  2694. # We look for Open Graph info:
  2695. # We have to match any number spaces between elements, some sites try to align them, e.g.: statigr.am
  2696. m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
  2697. # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
  2698. if m_video_type is not None:
  2699. found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
  2700. if found:
  2701. self.report_detected('Open Graph video info')
  2702. if not found:
  2703. REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
  2704. found = re.search(
  2705. r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
  2706. rf'(?:[a-z-]+="[^"]+"\s+)*?content="{REDIRECT_REGEX}',
  2707. webpage)
  2708. if not found:
  2709. # Look also in Refresh HTTP header
  2710. refresh_header = urlh and urlh.headers.get('Refresh')
  2711. if refresh_header:
  2712. found = re.search(REDIRECT_REGEX, refresh_header)
  2713. if found:
  2714. new_url = urllib.parse.urljoin(url, unescapeHTML(found.group(1)))
  2715. if new_url != url:
  2716. self.report_following_redirect(new_url)
  2717. return [self.url_result(new_url)]
  2718. else:
  2719. found = None
  2720. if not found:
  2721. # twitter:player is a https URL to iframe player that may or may not
  2722. # be supported by yt-dlp thus this is checked the very last (see
  2723. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2724. embed_url = self._html_search_meta('twitter:player', webpage, default=None)
  2725. if embed_url and embed_url != url:
  2726. self.report_detected('twitter:player iframe')
  2727. return [self.url_result(embed_url)]
  2728. if not found:
  2729. return []
  2730. domain_name = self._search_regex(r'^(?:https?://)?([^/]*)/.*', url, 'video uploader', default=None)
  2731. entries = []
  2732. for video_url in orderedSet(found):
  2733. video_url = video_url.encode().decode('unicode-escape')
  2734. video_url = unescapeHTML(video_url)
  2735. video_url = video_url.replace('\\/', '/')
  2736. video_url = urllib.parse.urljoin(url, video_url)
  2737. video_id = urllib.parse.unquote(os.path.basename(video_url))
  2738. # Sometimes, jwplayer extraction will result in a YouTube URL
  2739. if YoutubeIE.suitable(video_url):
  2740. entries.append(self.url_result(video_url, 'Youtube'))
  2741. continue
  2742. video_id = os.path.splitext(video_id)[0]
  2743. headers = {
  2744. 'referer': actual_url,
  2745. }
  2746. entry_info_dict = {
  2747. 'id': video_id,
  2748. 'uploader': domain_name,
  2749. 'title': info_dict['title'],
  2750. 'age_limit': info_dict['age_limit'],
  2751. 'http_headers': headers,
  2752. }
  2753. if RtmpIE.suitable(video_url):
  2754. entry_info_dict.update({
  2755. '_type': 'url_transparent',
  2756. 'ie_key': RtmpIE.ie_key(),
  2757. 'url': video_url,
  2758. })
  2759. entries.append(entry_info_dict)
  2760. continue
  2761. ext = determine_ext(video_url)
  2762. if ext == 'smil':
  2763. entry_info_dict = {**self._extract_smil_info(video_url, video_id), **entry_info_dict}
  2764. elif ext == 'xspf':
  2765. return [self._extract_xspf_playlist(video_url, video_id)]
  2766. elif ext == 'm3u8':
  2767. entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers)
  2768. self._extra_manifest_info(entry_info_dict, video_url)
  2769. elif ext == 'mpd':
  2770. entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers)
  2771. self._extra_manifest_info(entry_info_dict, video_url)
  2772. elif ext == 'f4m':
  2773. entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers)
  2774. elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
  2775. # Just matching .ism/manifest is not enough to be reliably sure
  2776. # whether it's actually an ISM manifest or some other streaming
  2777. # manifest since there are various streaming URL formats
  2778. # possible (see [1]) as well as some other shenanigans like
  2779. # .smil/manifest URLs that actually serve an ISM (see [2]) and
  2780. # so on.
  2781. # Thus the most reasonable way to solve this is to delegate
  2782. # to generic extractor in order to look into the contents of
  2783. # the manifest itself.
  2784. # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
  2785. # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
  2786. entry_info_dict = self.url_result(
  2787. smuggle_url(video_url, {'to_generic': True}),
  2788. GenericIE.ie_key())
  2789. else:
  2790. entry_info_dict['url'] = video_url
  2791. entries.append(entry_info_dict)
  2792. if len(entries) > 1:
  2793. for num, e in enumerate(entries, start=1):
  2794. # 'url' results don't have a title
  2795. if e.get('title') is not None:
  2796. e['title'] = '{} ({})'.format(e['title'], num)
  2797. return entries