projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1cd7e0
)
[twitch] Add support for rechat messages (closes #11524)
author
Sergey M․
<dstftw@gmail.com>
Sat, 24 Dec 2016 15:10:54 +0000
(22:10 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 24 Dec 2016 15:10:54 +0000
(22:10 +0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index 8de8ec65b842be8849c630731b1e1c3c94439c3b..bbf071da3ae280f2c2de0b289ff92ac4afe75439 100644
(file)
--- 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