1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

replace str '%s' with str format

This commit is contained in:
dalgr 2017-09-26 20:11:39 +02:00 committed by Johan Andersson
parent 27db933d6c
commit 0ce284c106

View File

@ -140,7 +140,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
if page > maxpage: if page > maxpage:
return videos return videos
res = self.http.get("http://www.svtplay.se/sista-chansen?sida=%s" % page) res = self.http.get("http://www.svtplay.se/sista-chansen?sida={}".format(page))
match = re.search("__svtplay'] = ({.*});", res.text) match = re.search("__svtplay'] = ({.*});", res.text)
if not match: if not match:
return videos return videos
@ -287,15 +287,15 @@ class Svtplay(Service, OpenGraphThumbMixin):
season = self.seasoninfo(data) season = self.seasoninfo(data)
title = name title = name
if season: if season:
title += ".%s" % season title += ".{}".format(season)
if other: if other:
title += ".%s" % other title += ".{}".format(other)
if "accessService" in data: if "accessService" in data:
if data["accessService"] == "audioDescription": if data["accessService"] == "audioDescription":
title += "-syntolkat" title += "-syntolkat"
if data["accessService"] == "signInterpretation": if data["accessService"] == "signInterpretation":
title += "-teckentolkat" title += "-teckentolkat"
title += "-%s-svtplay" % id title += "-{}-svtplay".format(id)
title = filenamify(title) title = filenamify(title)
if len(directory): if len(directory):
output = os.path.join(directory, title) output = os.path.join(directory, title)
@ -309,6 +309,6 @@ class Svtplay(Service, OpenGraphThumbMixin):
episode = "{:02d}".format(data["episodeNumber"]) episode = "{:02d}".format(data["episodeNumber"])
if int(season) == 0 and int(episode) == 0: if int(season) == 0 and int(episode) == 0:
return None return None
return "S%sE%s" % (season, episode) return "S{}E{}".format(season, episode)
else: else:
return None return None