0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[twitter] Fix short URL extraction

This commit is contained in:
Yen Chi Hsuan 2015-10-18 18:23:56 +08:00
parent 77a54b6a65
commit c88aec845a

View file

@ -128,7 +128,7 @@ def _real_extract(self, url):
title = self._og_search_description(webpage).strip('').replace('\n', ' ') title = self._og_search_description(webpage).strip('').replace('\n', ' ')
# strip 'https -_t.co_BJYgOjSeGA' junk from filenames # strip 'https -_t.co_BJYgOjSeGA' junk from filenames
mobj = re.match(r'“(.*)\s+(http://[^ ]+)”', title) mobj = re.match(r'“(.*)\s+(https?://[^ ]+)”', title)
title, short_url = mobj.groups() title, short_url = mobj.groups()
card_id = self._search_regex( card_id = self._search_regex(