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.

31 lines
1014 B

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. from ..utils import (
  4. xpath_text,
  5. xpath_with_ns,
  6. int_or_none,
  7. float_or_none,
  8. )
  9. class TweakersIE(InfoExtractor):
  10. _VALID_URL = r'https?://tweakers\.net/video/(?P<id>\d+)'
  11. _TEST = {
  12. 'url': 'https://tweakers.net/video/9926/new-nintendo-3ds-xl-op-alle-fronten-beter.html',
  13. 'md5': '3147e4ddad366f97476a93863e4557c8',
  14. 'info_dict': {
  15. 'id': '9926',
  16. 'ext': 'mp4',
  17. 'title': 'New Nintendo 3DS XL - Op alle fronten beter',
  18. 'description': 'md5:f97324cc71e86e11c853f0763820e3ba',
  19. 'thumbnail': 're:^https?://.*\.jpe?g$',
  20. 'duration': 386,
  21. }
  22. }
  23. def _real_extract(self, url):
  24. playlist_id = self._match_id(url)
  25. entries = self._extract_xspf_playlist(
  26. 'https://tweakers.net/video/s1playlist/%s/playlist.xspf' % playlist_id, playlist_id)
  27. return self.playlist_result(entries, playlist_id)