1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +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:
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)
if not match:
return videos
@ -287,15 +287,15 @@ class Svtplay(Service, OpenGraphThumbMixin):
season = self.seasoninfo(data)
title = name
if season:
title += ".%s" % season
title += ".{}".format(season)
if other:
title += ".%s" % other
title += ".{}".format(other)
if "accessService" in data:
if data["accessService"] == "audioDescription":
title += "-syntolkat"
if data["accessService"] == "signInterpretation":
title += "-teckentolkat"
title += "-%s-svtplay" % id
title += "-{}-svtplay".format(id)
title = filenamify(title)
if len(directory):
output = os.path.join(directory, title)
@ -309,6 +309,6 @@ class Svtplay(Service, OpenGraphThumbMixin):
episode = "{:02d}".format(data["episodeNumber"])
if int(season) == 0 and int(episode) == 0:
return None
return "S%sE%s" % (season, episode)
return "S{}E{}".format(season, episode)
else:
return None