Browse Source

[twitter] Use _html_search_regex

totalwebcasting
Yen Chi Hsuan 9 years ago
parent
commit
f6dfd6603a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/extractor/twitter.py

+ 1
- 1
youtube_dl/extractor/twitter.py View File

@ -122,7 +122,7 @@ class TwitterIE(InfoExtractor):
name = username
url = re.sub(r'https?://(m|mobile)\.', 'https://', 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', ' ')
splitdesc = re.match(r'^(.+?)\s*on Twitter:\s* "(.+?)"$', title)
if splitdesc:


Loading…
Cancel
Save