youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 264e77c406a3b14f15aafcd036524cb6fe86aa20
parent d1cd7e0ed9a562dbee6dfcb3601fdecc4158640b
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 24 Dec 2016 22:10:54 +0700

[twitch] Add support for rechat messages (closes #11524)

Diffstat:
Myoutube_dl/extractor/twitch.py | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py @@ -22,6 +22,7 @@ from ..utils import ( orderedSet, parse_duration, parse_iso8601, + update_url_query, urlencode_postdata, ) @@ -279,6 +280,18 @@ class TwitchVodIE(TwitchItemBaseIE): if 't' in query: info['start_time'] = parse_duration(query['t'][0]) + if info.get('timestamp') is not None: + info['subtitles'] = { + 'rechat': [{ + 'url': update_url_query( + 'https://rechat.twitch.tv/rechat-messages', { + 'video_id': 'v%s' % item_id, + 'start': info['timestamp'], + }), + 'ext': 'json', + }], + } + return info