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.

52 lines
1.7 KiB

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. class HellPornoIE(InfoExtractor):
  4. _VALID_URL = r'https?://(?:www\.)?hellporno\.com/videos/(?P<id>[^/]+)'
  5. _TEST = {
  6. 'url': 'http://hellporno.com/videos/dixie-is-posing-with-naked-ass-very-erotic/',
  7. 'md5': '1fee339c610d2049699ef2aa699439f1',
  8. 'info_dict': {
  9. 'id': '149116',
  10. 'display_id': 'dixie-is-posing-with-naked-ass-very-erotic',
  11. 'ext': 'mp4',
  12. 'title': 'Dixie is posing with naked ass very erotic',
  13. 'thumbnail': 're:https?://.*\.jpg$',
  14. 'age_limit': 18,
  15. }
  16. }
  17. def _real_extract(self, url):
  18. display_id = self._match_id(url)
  19. webpage = self._download_webpage(url, display_id)
  20. video_id = self._html_search_regex(
  21. r'video_id:\s*\'([^\']+)\'', webpage, 'id')
  22. ext = self._html_search_regex(
  23. r'postfix:\s*\'([^\']+)\'', webpage, 'ext')[1:]
  24. video_url = self._html_search_regex(
  25. r'video_url:\s*\'([^\']+)\'', webpage, 'video_url')
  26. title = self._html_search_regex(
  27. r'<title>([^<]+)\s*-\s*Hell Porno</title>', webpage, 'title')
  28. thumbnail = self._html_search_regex(
  29. r'preview_url:\s*\'([^\']+)\'',
  30. webpage, 'thumbnail', fatal=False)
  31. categories = self._html_search_meta(
  32. 'keywords', webpage, 'categories', default='').split(',')
  33. return {
  34. 'id': video_id,
  35. 'display_id': display_id,
  36. 'url': video_url,
  37. 'title': title,
  38. 'ext': ext,
  39. 'thumbnail': thumbnail,
  40. 'categories': categories,
  41. 'age_limit': 18,
  42. }