projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9650c3e
)
[twitch] Pass video id to url_result when extracting playlist
author
Luc Ritchie
<luc.ritchie@gmail.com>
Wed, 3 Jan 2018 09:22:55 +0000
(
04:22
-0500)
committer
Sergey M
<dstftw@gmail.com>
Wed, 3 Jan 2018 09:22:55 +0000
(16:22 +0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index bf57eac01f2f42dd5dd4d4fc7bdce55f08ee7513..f9164af098d8a7529f290e2297a4974fe2004af5 100644
(file)
--- a/
youtube_dl/extractor/twitch.py
+++ b/
youtube_dl/extractor/twitch.py
@@
-358,9
+358,16
@@
class TwitchPlaylistBaseIE(TwitchBaseIE):
break
offset += limit
return self.playlist_result(
break
offset += limit
return self.playlist_result(
- [self.url_result(entry) for entry in orderedSet(entries)],
+ [self.
_make_
url_result(entry) for entry in orderedSet(entries)],
channel_id, channel_name)
channel_id, channel_name)
+ def _make_url_result(self, url):
+ try:
+ video_id = 'v%s' % TwitchVodIE._match_id(url)
+ return self.url_result(url, TwitchVodIE.ie_key(), video_id=video_id)
+ except AssertionError:
+ return self.url_result(url)
+
def _extract_playlist_page(self, response):
videos = response.get('videos')
return [video['url'] for video in videos] if videos else []
def _extract_playlist_page(self, response):
videos = response.get('videos')
return [video['url'] for video in videos] if videos else []