Skip to content

Commit

Permalink
twitch.tv chapters: Include uploader (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
phihag committed May 4, 2013
1 parent db8fd71 commit c43e572
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion youtube_dl/InfoExtractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3384,11 +3384,12 @@ def _real_extract(self, url):
video_ext = video_url.rpartition('.')[2] or u'flv'

chapter_api_url = u'https://api.twitch.tv/kraken/videos/c' + chapter_id
chapter_info_json = self._download_webpage(chapter_api_url, video_id,
chapter_info_json = self._download_webpage(chapter_api_url, u'c' + chapter_id,
note='Downloading chapter metadata',
errnote='Download of chapter metadata failed')
chapter_info = json.loads(chapter_info_json)


# TODO determine start (and probably fix up file)
# youtube-dl -v http://www.twitch.tv/firmbelief/c/1757457
#video_url += u'?start=' + a.find('./start_timestamp').text
Expand All @@ -3401,6 +3402,8 @@ def _real_extract(self, url):
'title': chapter_info['title'],
'thumbnail': chapter_info['preview'],
'description': chapter_info['description'],
'uploader': chapter_info['channel']['display_name'],
'uploader_id': chapter_info['channel']['name'],
}
return [info]
else:
Expand Down

0 comments on commit c43e572

Please sign in to comment.