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.

40 lines
1.3 KiB

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. class SlutloadIE(InfoExtractor):
  4. _VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$'
  5. _TEST = {
  6. 'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
  7. 'md5': '868309628ba00fd488cf516a113fd717',
  8. 'info_dict': {
  9. 'id': 'TD73btpBqSxc',
  10. 'ext': 'mp4',
  11. 'title': 'virginie baisee en cam',
  12. 'age_limit': 18,
  13. 'thumbnail': r're:https?://.*?\.jpg'
  14. }
  15. }
  16. def _real_extract(self, url):
  17. video_id = self._match_id(url)
  18. webpage = self._download_webpage(url, video_id)
  19. video_title = self._html_search_regex(r'<h1><strong>([^<]+)</strong>',
  20. webpage, 'title').strip()
  21. video_url = self._html_search_regex(
  22. r'(?s)<div id="vidPlayer"\s+data-url="([^"]+)"',
  23. webpage, 'video URL')
  24. thumbnail = self._html_search_regex(
  25. r'(?s)<div id="vidPlayer"\s+.*?previewer-file="([^"]+)"',
  26. webpage, 'thumbnail', fatal=False)
  27. return {
  28. 'id': video_id,
  29. 'url': video_url,
  30. 'title': video_title,
  31. 'thumbnail': thumbnail,
  32. 'age_limit': 18
  33. }