mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-09 00:13:22 +08:00
[twitter] Allow single dash to be used as username
This commit is contained in:
parent
c9b0564ac1
commit
c07d8c5326
@ -105,6 +105,9 @@ class TwitterCardIE(TwitterBaseIE):
|
||||
}, {
|
||||
'url': 'https://twitter.com/i/videos/752274308186120192',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://twitter.com/-/status/1087791357756956680',
|
||||
'only_matching': True,
|
||||
},
|
||||
]
|
||||
|
||||
@ -280,7 +283,7 @@ class TwitterCardIE(TwitterBaseIE):
|
||||
|
||||
class TwitterIE(InfoExtractor):
|
||||
IE_NAME = 'twitter'
|
||||
_VALID_URL = r'https?://(?:www\.|m\.|mobile\.)?twitter\.com/(?:i/web|(?P<user_id>[^/]+))/status/(?P<id>\d+)'
|
||||
_VALID_URL = r'https?://(?:www\.|m\.|mobile\.)?twitter\.com/(?:i/web|-|(?P<user_id>[^/]+))/status/(?P<id>\d+)'
|
||||
_TEMPLATE_URL = 'https://twitter.com/%s/status/%s'
|
||||
_TEMPLATE_STATUSES_URL = 'https://twitter.com/statuses/%s'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user