cableav.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. from .common import InfoExtractor
  2. class CableAVIE(InfoExtractor):
  3. _VALID_URL = r'https://cableav\.tv/(?P<id>[a-zA-Z0-9]+)'
  4. _TESTS = [{
  5. 'url': 'https://cableav.tv/lS4iR9lWjN8/',
  6. 'md5': '7e3fe5e49d61c4233b7f5b0f69b15e18',
  7. 'info_dict': {
  8. 'id': 'lS4iR9lWjN8',
  9. 'ext': 'mp4',
  10. 'title': '國產麻豆AV 叮叮映畫 DDF001 情欲小說家 - CableAV',
  11. 'description': '國產AV 480p, 720p 国产麻豆AV 叮叮映画 DDF001 情欲小说家',
  12. 'thumbnail': r're:^https?://.*\.jpg$',
  13. }
  14. }]
  15. def _real_extract(self, url):
  16. video_id = self._match_id(url)
  17. webpage = self._download_webpage(url, video_id)
  18. video_url = self._og_search_video_url(webpage, secure=False)
  19. formats = self._extract_m3u8_formats(video_url, video_id, 'mp4')
  20. return {
  21. 'id': video_id,
  22. 'title': self._og_search_title(webpage),
  23. 'description': self._og_search_description(webpage),
  24. 'thumbnail': self._og_search_thumbnail(webpage),
  25. 'formats': formats,
  26. }