1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-02 07:35:28 +00:00
youtube-dl/youtube_dl/extractor/tweakers.py

32 lines
1,014 B
Python
Raw Normal View History

2015-02-05 18:55:41 +00:00
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
xpath_text,
xpath_with_ns,
int_or_none,
float_or_none,
)
2015-02-05 18:55:41 +00:00
class TweakersIE(InfoExtractor):
_VALID_URL = r'https?://tweakers\.net/video/(?P<id>\d+)'
2015-02-05 18:55:41 +00:00
_TEST = {
'url': 'https://tweakers.net/video/9926/new-nintendo-3ds-xl-op-alle-fronten-beter.html',
'md5': '1b5afa817403bb5baa08359dca31e6df',
2015-02-05 18:55:41 +00:00
'info_dict': {
'id': '9926',
'ext': 'mp4',
'title': 'New Nintendo 3DS XL - Op alle fronten beter',
'description': 'md5:f97324cc71e86e11c853f0763820e3ba',
'thumbnail': 're:^https?://.*\.jpe?g$',
'duration': 386,
2015-02-05 18:55:41 +00:00
}
}
def _real_extract(self, url):
2015-08-09 13:15:00 +00:00
playlist_id = self._match_id(url)
entries = self._extract_xspf_playlist(
'https://tweakers.net/video/s1playlist/%s/playlist.xspf' % playlist_id, playlist_id)
return self.playlist_result(entries, playlist_id)