You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
9.5 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. from __future__ import unicode_literals
  2. from .mtv import MTVIE
  3. import re
  4. from ..utils import fix_xml_ampersands
  5. class VH1IE(MTVIE):
  6. IE_NAME = 'vh1.com'
  7. _FEED_URL = 'http://www.vh1.com/player/embed/AS3/fullepisode/rss/'
  8. _TESTS = [{
  9. 'url': 'http://www.vh1.com/video/metal-evolution/full-episodes/progressive-metal/1678612/playlist.jhtml',
  10. 'playlist': [
  11. {
  12. 'md5': '7827a7505f59633983165bbd2c119b52',
  13. 'info_dict': {
  14. 'id': '731565',
  15. 'ext': 'mp4',
  16. 'title': 'Metal Evolution: Ep. 11 Act 1',
  17. 'description': 'Many rock academics have proclaimed that the truly progressive musicianship of the last 20 years has been found right here in the world of heavy metal, rather than obvious locales such as jazz, fusion or progressive rock. It stands to reason then, that much of this jaw-dropping virtuosity occurs within what\'s known as progressive metal, a genre that takes root with the likes of Rush in the \'70s, Queensryche and Fates Warning in the \'80s, and Dream Theater in the \'90s. Since then, the genre has exploded with creativity, spawning mind-bending, genre-defying acts such as Tool, Mastodon, Coheed And Cambria, Porcupine Tree, Meshuggah, A Perfect Circle and Opeth. Episode 12 looks at the extreme musicianship of these bands, as well as their often extreme literary prowess and conceptual strength, the end result being a rich level of respect and attention such challenging acts have brought upon the world of heavy metal, from a critical community usually dismissive of the form.'
  18. }
  19. },
  20. {
  21. 'md5': '34fb4b7321c546b54deda2102a61821f',
  22. 'info_dict': {
  23. 'id': '731567',
  24. 'ext': 'mp4',
  25. 'title': 'Metal Evolution: Ep. 11 Act 2',
  26. 'description': 'Many rock academics have proclaimed that the truly progressive musicianship of the last 20 years has been found right here in the world of heavy metal, rather than obvious locales such as jazz, fusion or progressive rock. It stands to reason then, that much of this jaw-dropping virtuosity occurs within what\'s known as progressive metal, a genre that takes root with the likes of Rush in the \'70s, Queensryche and Fates Warning in the \'80s, and Dream Theater in the \'90s. Since then, the genre has exploded with creativity, spawning mind-bending, genre-defying acts such as Tool, Mastodon, Coheed And Cambria, Porcupine Tree, Meshuggah, A Perfect Circle and Opeth. Episode 11 looks at the extreme musicianship of these bands, as well as their often extreme literary prowess and conceptual strength, the end result being a rich level of respect and attention such challenging acts have brought upon the world of heavy metal, from a critical community usually dismissive of the form.'
  27. }
  28. },
  29. {
  30. 'md5': '813f38dba4c1b8647196135ebbf7e048',
  31. 'info_dict': {
  32. 'id': '731568',
  33. 'ext': 'mp4',
  34. 'title': 'Metal Evolution: Ep. 11 Act 3',
  35. 'description': 'Many rock academics have proclaimed that the truly progressive musicianship of the last 20 years has been found right here in the world of heavy metal, rather than obvious locales such as jazz, fusion or progressive rock. It stands to reason then, that much of this jaw-dropping virtuosity occurs within what\'s known as progressive metal, a genre that takes root with the likes of Rush in the \'70s, Queensryche and Fates Warning in the \'80s, and Dream Theater in the \'90s. Since then, the genre has exploded with creativity, spawning mind-bending, genre-defying acts such as Tool, Mastodon, Coheed And Cambria, Porcupine Tree, Meshuggah, A Perfect Circle and Opeth. Episode 11 looks at the extreme musicianship of these bands, as well as their often extreme literary prowess and conceptual strength, the end result being a rich level of respect and attention such challenging acts have brought upon the world of heavy metal, from a critical community usually dismissive of the form.'
  36. }
  37. },
  38. {
  39. 'md5': '51adb72439dfaed11c799115d76e497f',
  40. 'info_dict': {
  41. 'id': '731569',
  42. 'ext': 'mp4',
  43. 'title': 'Metal Evolution: Ep. 11 Act 4',
  44. 'description': 'Many rock academics have proclaimed that the truly progressive musicianship of the last 20 years has been found right here in the world of heavy metal, rather than obvious locales such as jazz, fusion or progressive rock. It stands to reason then, that much of this jaw-dropping virtuosity occurs within what\'s known as progressive metal, a genre that takes root with the likes of Rush in the \'70s, Queensryche and Fates Warning in the \'80s, and Dream Theater in the \'90s. Since then, the genre has exploded with creativity, spawning mind-bending, genre-defying acts such as Tool, Mastodon, Coheed And Cambria, Porcupine Tree, Meshuggah, A Perfect Circle and Opeth. Episode 11 looks at the extreme musicianship of these bands, as well as their often extreme literary prowess and conceptual strength, the end result being a rich level of respect and attention such challenging acts have brought upon the world of heavy metal, from a critical community usually dismissive of the form.'
  45. }
  46. },
  47. {
  48. 'md5': '93d554aaf79320703b73a95288c76a6e',
  49. 'info_dict': {
  50. 'id': '731570',
  51. 'ext': 'mp4',
  52. 'title': 'Metal Evolution: Ep. 11 Act 5',
  53. 'description': 'Many rock academics have proclaimed that the truly progressive musicianship of the last 20 years has been found right here in the world of heavy metal, rather than obvious locales such as jazz, fusion or progressive rock. It stands to reason then, that much of this jaw-dropping virtuosity occurs within what\'s known as progressive metal, a genre that takes root with the likes of Rush in the \'70s, Queensryche and Fates Warning in the \'80s, and Dream Theater in the \'90s. Since then, the genre has exploded with creativity, spawning mind-bending, genre-defying acts such as Tool, Mastodon, Coheed And Cambria, Porcupine Tree, Meshuggah, A Perfect Circle and Opeth. Episode 11 looks at the extreme musicianship of these bands, as well as their often extreme literary prowess and conceptual strength, the end result being a rich level of respect and attention such challenging acts have brought upon the world of heavy metal, from a critical community usually dismissive of the form.'
  54. }
  55. }
  56. ],
  57. 'skip': 'Blocked outside the US',
  58. }, {
  59. # Clip
  60. 'url': 'http://www.vh1.com/video/misc/706675/metal-evolution-episode-1-pre-metal-show-clip.jhtml#id=1674118',
  61. 'md5': '7d67cf6d9cdc6b4f3d3ac97a55403844',
  62. 'info_dict': {
  63. 'id': '706675',
  64. 'ext': 'mp4',
  65. 'title': 'Metal Evolution: Episode 1 Pre-Metal Show Clip',
  66. 'description': 'The greatest documentary ever made about Heavy Metal begins as our host Sam Dunn travels the globe to seek out the origins and influences that helped create Heavy Metal. Sam speaks to legends like Kirk Hammett, Alice Cooper, Slash, Bill Ward, Geezer Butler, Tom Morello, Ace Frehley, Lemmy Kilmister, Dave Davies, and many many more. This episode is the prologue for the 11 hour series, and Sam goes back to the very beginning to reveal how Heavy Metal was created.'
  67. },
  68. 'skip': 'Blocked outside the US',
  69. }, {
  70. # Short link
  71. 'url': 'http://www.vh1.com/video/play.jhtml?id=1678353',
  72. 'md5': '853192b87ad978732b67dd8e549b266a',
  73. 'info_dict': {
  74. 'id': '730355',
  75. 'ext': 'mp4',
  76. 'title': 'Metal Evolution: Episode 11 Progressive Metal Sneak',
  77. 'description': 'In Metal Evolution\'s finale sneak, Sam sits with Michael Giles of King Crimson and gets feedback from Metallica guitarist Kirk Hammett on why the group was influential.'
  78. },
  79. 'skip': 'Blocked outside the US',
  80. }, {
  81. 'url': 'http://www.vh1.com/video/macklemore-ryan-lewis/900535/cant-hold-us-ft-ray-dalton.jhtml',
  82. 'md5': 'b1bcb5b4380c9d7f544065589432dee7',
  83. 'info_dict': {
  84. 'id': '900535',
  85. 'ext': 'mp4',
  86. 'title': 'Macklemore & Ryan Lewis - "Can\'t Hold Us ft. Ray Dalton"',
  87. 'description': 'The Heist'
  88. },
  89. 'skip': 'Blocked outside the US',
  90. }]
  91. _VALID_URL = r'''(?x)
  92. https?://www\.vh1\.com/video/
  93. (?:
  94. .+?/full-episodes/.+?/(?P<playlist_id>[^/]+)/playlist\.jhtml
  95. |
  96. (?:
  97. play.jhtml\?id=|
  98. misc/.+?/.+?\.jhtml\#id=
  99. )
  100. (?P<video_id>[0-9]+)$
  101. |
  102. [^/]+/(?P<music_id>[0-9]+)/[^/]+?
  103. )
  104. '''
  105. def _real_extract(self, url):
  106. mobj = re.match(self._VALID_URL, url)
  107. if mobj.group('music_id'):
  108. id_field = 'vid'
  109. video_id = mobj.group('music_id')
  110. else:
  111. video_id = mobj.group('playlist_id') or mobj.group('video_id')
  112. id_field = 'id'
  113. doc_url = '%s?%s=%s' % (self._FEED_URL, id_field, video_id)
  114. idoc = self._download_xml(
  115. doc_url, video_id,
  116. 'Downloading info', transform_source=fix_xml_ampersands)
  117. return [self._get_video_info(item) for item in idoc.findall('.//item')]