]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/tweakers.py
Merge pull request #6533 from sceext2/fix-iqiyi-2015-08-10
[yt-dlp.git] / youtube_dl / extractor / tweakers.py
CommitLineData
e3aaace4 1from __future__ import unicode_literals
2
e3aaace4 3from .common import InfoExtractor
9c91a8fa
S
4from ..utils import (
5 xpath_text,
6 xpath_with_ns,
7 int_or_none,
8 float_or_none,
9)
e3aaace4 10
11
12class TweakersIE(InfoExtractor):
9c91a8fa 13 _VALID_URL = r'https?://tweakers\.net/video/(?P<id>\d+)'
e3aaace4 14 _TEST = {
15 'url': 'https://tweakers.net/video/9926/new-nintendo-3ds-xl-op-alle-fronten-beter.html',
0dcb318f 16 'md5': '3147e4ddad366f97476a93863e4557c8',
e3aaace4 17 'info_dict': {
18 'id': '9926',
19 'ext': 'mp4',
9c91a8fa
S
20 'title': 'New Nintendo 3DS XL - Op alle fronten beter',
21 'description': 'md5:f97324cc71e86e11c853f0763820e3ba',
22 'thumbnail': 're:^https?://.*\.jpe?g$',
23 'duration': 386,
e3aaace4 24 }
25 }
26
27 def _real_extract(self, url):
f3214346
S
28 playlist_id = self._match_id(url)
29 entries = self._extract_xspf_playlist(
30 'https://tweakers.net/video/s1playlist/%s/playlist.xspf' % playlist_id, playlist_id)
31 return self.playlist_result(entries, playlist_id)