1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

twitch: this should be episodename

This commit is contained in:
Johan Andersson 2018-05-27 16:04:39 +02:00
parent f754197713
commit 25831bd1a9

View File

@ -74,7 +74,7 @@ class Twitch(Service):
return return
info = json.loads(data.text) info = json.loads(data.text)
self.output["title"] = "twitch-{0}".format(info["channel"]["name"]) self.output["title"] = "twitch-{0}".format(info["channel"]["name"])
self.output["name"] = info["title"] self.output["episodename"] = info["title"]
if "token" not in access: if "token" not in access:
raise TwitchUrlException('video', self.url) raise TwitchUrlException('video', self.url)
@ -159,7 +159,7 @@ class Twitch(Service):
name = re.search('slug: "([^"]+)"', self.get_urldata()).group(1) name = re.search('slug: "([^"]+)"', self.get_urldata()).group(1)
brodcaster = re.search('broadcaster_login: "([^"]+)"', self.get_urldata()).group(1) brodcaster = re.search('broadcaster_login: "([^"]+)"', self.get_urldata()).group(1)
self.output["title"] = "twitch-{0}".format(brodcaster) self.output["title"] = "twitch-{0}".format(brodcaster)
self.output["name"] = name self.output["episodename"] = name
dataj = json.loads(match.group(1)) dataj = json.loads(match.group(1))
for i in dataj: for i in dataj: