1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-01 22:47:59 +00:00

[twitter] Inherit from InfoExtractor directly

This commit is contained in:
Yen Chi Hsuan 2015-10-18 17:16:57 +08:00
parent f322bfb063
commit e04edad621

View file

@ -97,11 +97,11 @@ class TwitterCardIE(InfoExtractor):
} }
class TwitterIE(TwitterCardIE): class TwitterIE(InfoExtractor):
IE_NAME = 'twitter' IE_NAME = 'twitter'
_VALID_URL = r'https?://(?:www|m|mobile)?\.?twitter\.com/(?P<id>[^/]+/status/\d+)' _VALID_URL = r'https?://(?:www|m|mobile)?\.?twitter\.com/(?P<id>[^/]+/status/\d+)'
_TESTS = [{ _TEST = {
'url': 'https://twitter.com/freethenipple/status/643211948184596480', 'url': 'https://twitter.com/freethenipple/status/643211948184596480',
'md5': '31cd83a116fc41f99ae3d909d4caf6a0', 'md5': '31cd83a116fc41f99ae3d909d4caf6a0',
'info_dict': { 'info_dict': {
@ -114,7 +114,7 @@ class TwitterIE(TwitterCardIE):
'uploader': 'FREE THE NIPPLE', 'uploader': 'FREE THE NIPPLE',
'uploader_id': 'freethenipple', 'uploader_id': 'freethenipple',
}, },
}] }
def _real_extract(self, url): def _real_extract(self, url):
id = self._match_id(url) id = self._match_id(url)