mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 20:22:14 +00:00
[twitter] Use _html_search_regex
This commit is contained in:
parent
e04edad621
commit
f6dfd6603a
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ class TwitterIE(InfoExtractor):
|
||||||
name = username
|
name = username
|
||||||
url = re.sub(r'https?://(m|mobile)\.', 'https://', url)
|
url = re.sub(r'https?://(m|mobile)\.', 'https://', url)
|
||||||
webpage = self._download_webpage(url, 'tweet: ' + url)
|
webpage = self._download_webpage(url, 'tweet: ' + url)
|
||||||
description = unescapeHTML(self._search_regex('<title>\s*(.+?)\s*</title>', webpage, 'title'))
|
description = self._html_search_regex('<title>\s*(.+?)\s*</title>', webpage, 'title')
|
||||||
title = description.replace('\n', ' ')
|
title = description.replace('\n', ' ')
|
||||||
splitdesc = re.match(r'^(.+?)\s*on Twitter:\s* "(.+?)"$', title)
|
splitdesc = re.match(r'^(.+?)\s*on Twitter:\s* "(.+?)"$', title)
|
||||||
if splitdesc:
|
if splitdesc:
|
||||||
|
|
Loading…
Reference in a new issue