diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-05-04 12:02:18 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-05-04 12:02:18 +0200 |
commit | 4539dd30e6c00a50760094e7a41744843d659cb1 (patch) | |
tree | 7bd5d78b89be688b7e7338eecbadf1c0dc9bb61a /youtube_dl/InfoExtractors.py | |
parent | c43e57242e10eae327d4348390cfb9e574fad5dd (diff) | |
download | youtube-dl-4539dd30e6c00a50760094e7a41744843d659cb1.tar.xz |
twitch.tv chapters (#810): print out start and end time
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 96c597396..36343882b 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -3389,11 +3389,15 @@ class JustinTVIE(InfoExtractor): errnote='Download of chapter metadata failed') chapter_info = json.loads(chapter_info_json) + bracket_start = int(doc.find('.//bracket_start').text) + bracket_end = int(doc.find('.//bracket_end').text) # 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 - self._downloader.report_warning(u'Chapter detected, but we do not know how to calculate start position. Downloading the whole file ... (See https://github.com/rg3/youtube-dl/issues/810 )') + #video_url += u'?start=' + TODO:start_timestamp + # bracket_start is 13290, but we want 51670615 + self._downloader.report_warning(u'Chapter detected, but we can just download the whole file. ' + u'Chapter starts at %s and ends at %s' % (formatSeconds(bracket_start), formatSeconds(bracket_end))) info = { 'id': u'c' + chapter_id, |