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.

149 lines
4.5 KiB

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. from ..utils import (
  4. compat_urllib_parse
  5. )
  6. class Play44IE(InfoExtractor):
  7. _VALID_URL = r'http://[w.]*play44\.net/embed\.php[^/]*/(?P<id>.+)'
  8. _TESTS = [{
  9. 'url': 'http://play44.net/embed.php?w=600&h=438&vid=M/mahou-shoujo-madoka-magica-07.flv',
  10. 'md5': 'e37e99d665f503dd2db952f7c4dba9e6',
  11. 'info_dict': {
  12. 'id': 'mahou-shoujo-madoka-magica-07',
  13. 'ext': 'flv',
  14. 'title': 'mahou-shoujo-madoka-magica-07',
  15. }
  16. }]
  17. def _real_extract(self, url):
  18. video_id = self._match_id(url)
  19. page = self._download_webpage(url, video_id)
  20. video_url = compat_urllib_parse.unquote(self._html_search_regex(
  21. r'_url = "(https?://[^"]+?)";', page, 'url'))
  22. title = self._search_regex(r'.*/(?P<title>[^.]*).', video_url, 'title')
  23. return {
  24. 'id': title,
  25. 'url': video_url,
  26. 'title': title,
  27. }
  28. class ByZooIE(Play44IE):
  29. _VALID_URL = r'http://[w.]*byzoo\.org/embed\.php[^/]*/(?P<id>.+)'
  30. _TESTS = [{
  31. 'url': 'http://byzoo.org/embed.php?w=600&h=438&vid=at/nw/mahou_shoujo_madoka_magica_movie_3_-_part1.mp4',
  32. 'md5': '455c83dabe2cd9fd74a87612b01fe017',
  33. 'info_dict': {
  34. 'id': 'mahou_shoujo_madoka_magica_movie_3_-_part1',
  35. 'ext': 'mp4',
  36. 'title': 'mahou_shoujo_madoka_magica_movie_3_-_part1',
  37. }
  38. }]
  39. class Video44IE(Play44IE):
  40. _VALID_URL = r'http://[w.]*video44\.net/.*file=(?P<id>[^&].).*'
  41. _TESTS = [{
  42. 'url': 'http://www.video44.net/gogo/?w=600&h=438&file=chaoshead-12.flv&sv=1',
  43. 'md5': '43eaec6d0beb10e8d42459b9f108aff3',
  44. 'info_dict': {
  45. 'id': 'chaoshead-12',
  46. 'ext': 'mp4',
  47. 'title': 'chaoshead-12',
  48. }
  49. }]
  50. class VideoWingIE(Play44IE):
  51. _VALID_URL = r'''(?x)
  52. http://[w.]*videowing\.[^/]*/
  53. (?:
  54. .*video=/*
  55. |embed/
  56. )
  57. (?P<id>[^&?.]+)
  58. '''
  59. _TESTS = [{
  60. 'url': 'http://videowing.me/embed?w=718&h=438&video=ongoing/boku_wa_tomodachi_ga_sukunai_-_05.mp4',
  61. 'md5': '4ed320e353ed26c742c4f12a9c210b60',
  62. 'info_dict': {
  63. 'id': 'boku_wa_tomodachi_ga_sukunai_-_05',
  64. 'ext': 'mp4',
  65. 'title': 'boku_wa_tomodachi_ga_sukunai_-_05',
  66. }
  67. }, {
  68. 'url': 'http://videowing.me/embed/a8d6a39522df066bd734a69f2334497e?w=600&h=438',
  69. 'md5': '33fdd71581357018c226f95c5cedcfd7',
  70. 'info_dict': {
  71. 'id': 'mahoushoujomadokamagicamovie1part1',
  72. 'ext': 'flv',
  73. 'title': 'mahoushoujomadokamagicamovie1part1',
  74. }
  75. }]
  76. class PlayPandaIE(Play44IE):
  77. _VALID_URL = r'http://[w.]*playpanda\.[^/]*/.*vid=/*(?P<id>[^&].).*'
  78. _TESTS = [{
  79. 'url': 'http://playpanda.net/embed.php?w=718&h=438&vid=at/nw/boku_wa_tomodachi_ga_sukunai_-_05.mp4',
  80. 'md5': '4ed320e353ed26c742c4f12a9c210b60',
  81. 'info_dict': {
  82. 'id': 'boku_wa_tomodachi_ga_sukunai_-_05',
  83. 'ext': 'mp4',
  84. 'title': 'boku_wa_tomodachi_ga_sukunai_-_05',
  85. 'description': 'boku_wa_tomodachi_ga_sukunai_-_05'
  86. }
  87. }]
  88. class VideoZooIE(Play44IE):
  89. _VALID_URL = r'http://[w.]*videozoo\.[^/]*/.*vid=/*(?P<id>[^&].).*'
  90. _TESTS = [{
  91. 'url': 'http://videozoo.me/embed.php?w=718&h=438&vid=at/nw/boku_wa_tomodachi_ga_sukunai_-_05.mp4',
  92. 'md5': '4ed320e353ed26c742c4f12a9c210b60',
  93. 'info_dict': {
  94. 'id': 'boku_wa_tomodachi_ga_sukunai_-_05',
  95. 'ext': 'mp4',
  96. 'title': 'boku_wa_tomodachi_ga_sukunai_-_05',
  97. }
  98. }]
  99. class PlayBBIE(Play44IE):
  100. _VALID_URL = r'http://[w.]*playbb\.[^/]*/.*vid=/*(?P<id>[^&].).*'
  101. _TESTS = [{
  102. 'url': 'http://playbb.me/embed.php?w=718&h=438&vid=at/nw/boku_wa_tomodachi_ga_sukunai_-_05.mp4',
  103. 'md5': '4ed320e353ed26c742c4f12a9c210b60',
  104. 'info_dict': {
  105. 'id': 'boku_wa_tomodachi_ga_sukunai_-_05',
  106. 'ext': 'mp4',
  107. 'title': 'boku_wa_tomodachi_ga_sukunai_-_05',
  108. }
  109. }]
  110. class EasyVideoIE(Play44IE):
  111. _VALID_URL = r'http://[w.]*easyvideo\.[^/]*/.*file=/*(?P<id>[^&.]+)'
  112. _TESTS = [{
  113. 'url': 'http://easyvideo.me/gogo/?w=718&h=438&file=bokuwatomodachigasukunai-04.flv&sv=1',
  114. 'md5': '26178b57629b7650106d72b191137176',
  115. 'info_dict': {
  116. 'id': 'bokuwatomodachigasukunai-04',
  117. 'ext': 'mp4',
  118. 'title': 'bokuwatomodachigasukunai-04',
  119. },
  120. 'skip': 'Blocked in Germany',
  121. }]