diff options
| author | Sergey M․ <dstftw@gmail.com> | 2014-06-22 01:20:40 +0700 | 
|---|---|---|
| committer | Sergey M․ <dstftw@gmail.com> | 2014-06-22 01:20:40 +0700 | 
| commit | d2824416aa9cc43d92a44a820026378cae70ca9f (patch) | |
| tree | 61a2ff100a228efc09b54615442b4039026f430a | |
| parent | 18061bbab046ef0c237b955bb86b7bed3aa97256 (diff) | |
[firstpost] Fix title extraction and add description
| -rw-r--r-- | youtube_dl/extractor/firstpost.py | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/firstpost.py b/youtube_dl/extractor/firstpost.py index eccd8dde9..0993af1c9 100644 --- a/youtube_dl/extractor/firstpost.py +++ b/youtube_dl/extractor/firstpost.py @@ -15,6 +15,7 @@ class FirstpostIE(InfoExtractor):              'id': '1025403',              'ext': 'mp4',              'title': 'India to launch indigenous aircraft carrier INS Vikrant today', +            'description': 'md5:feef3041cb09724e0bdc02843348f5f4',          }      } @@ -22,13 +23,16 @@ class FirstpostIE(InfoExtractor):          mobj = re.match(self._VALID_URL, url)          video_id = mobj.group('id') +        page = self._download_webpage(url, video_id) +        title = self._html_search_meta('twitter:title', page, 'title') +        description = self._html_search_meta('twitter:description', page, 'title') +          data = self._download_xml(              'http://www.firstpost.com/getvideoxml-%s.xml' % video_id, video_id,              'Downloading video XML')          item = data.find('./playlist/item')          thumbnail = item.find('./image').text -        title = item.find('./title').text          formats = [              { @@ -42,6 +46,7 @@ class FirstpostIE(InfoExtractor):          return {              'id': video_id,              'title': title, +            'description': description,              'thumbnail': thumbnail,              'formats': formats,          } | 
