logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git

nonktube.py (1151B)


  1. from __future__ import unicode_literals
  2. from .nuevo import NuevoBaseIE
  3. class NonkTubeIE(NuevoBaseIE):
  4. _VALID_URL = r'https?://(?:www\.)?nonktube\.com/(?:(?:video|embed)/|media/nuevo/embed\.php\?.*?\bid=)(?P<id>\d+)'
  5. _TESTS = [{
  6. 'url': 'https://www.nonktube.com/video/118636/sensual-wife-uncensored-fucked-in-hairy-pussy-and-facialized',
  7. 'info_dict': {
  8. 'id': '118636',
  9. 'ext': 'mp4',
  10. 'title': 'Sensual Wife Uncensored Fucked In Hairy Pussy And Facialized',
  11. 'age_limit': 18,
  12. 'duration': 1150.98,
  13. },
  14. 'params': {
  15. 'skip_download': True,
  16. }
  17. }, {
  18. 'url': 'https://www.nonktube.com/embed/118636',
  19. 'only_matching': True,
  20. }]
  21. def _real_extract(self, url):
  22. video_id = self._match_id(url)
  23. webpage = self._download_webpage(url, video_id)
  24. title = self._og_search_title(webpage)
  25. info = self._parse_html5_media_entries(url, webpage, video_id)[0]
  26. info.update({
  27. 'id': video_id,
  28. 'title': title,
  29. 'age_limit': 18,
  30. })
  31. return info