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.

36 lines
1.1 KiB

  1. # encoding: utf-8
  2. from __future__ import unicode_literals
  3. import re
  4. from .nuevo import NuevoBaseIE
  5. class TrollvidsIE(NuevoBaseIE):
  6. _VALID_URL = r'https?://(?:www\.)?trollvids\.com/video/(?P<id>\d+)/(?P<display_id>[^/?#&]+)'
  7. IE_NAME = 'trollvids'
  8. _TEST = {
  9. 'url': 'http://trollvids.com/video/2349002/%E3%80%90MMD-R-18%E3%80%91%E3%82%AC%E3%83%BC%E3%83%AB%E3%83%95%E3%83%AC%E3%83%B3%E3%83%89-carrymeoff',
  10. 'md5': '1d53866b2c514b23ed69e4352fdc9839',
  11. 'info_dict': {
  12. 'id': '2349002',
  13. 'ext': 'mp4',
  14. 'title': '【MMD R-18】ガールフレンド carry_me_off',
  15. 'age_limit': 18,
  16. 'duration': 216.78,
  17. },
  18. }
  19. def _real_extract(self, url):
  20. mobj = re.match(self._VALID_URL, url)
  21. video_id = mobj.group('id')
  22. display_id = mobj.group('display_id')
  23. info = self._extract_nuevo(
  24. 'http://trollvids.com/nuevo/player/config.php?v=%s' % video_id,
  25. video_id)
  26. info.update({
  27. 'display_id': display_id,
  28. 'age_limit': 18
  29. })
  30. return info