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.

25 lines
919 B

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