replace old %-formatted and .format(…) strings with f-strings (#7671)
mostly using flynt https://github.com/ikamensh/flynt
This commit is contained in:
@@ -63,7 +63,7 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
|
||||
file["filename"] = file["name"] + "-" + fid
|
||||
elif "id" in file:
|
||||
file["name"] = file["filename"]
|
||||
file["filename"] = "{}-{}".format(file["name"], file["id"])
|
||||
file["filename"] = f"{file['name']}-{file['id']}"
|
||||
else:
|
||||
file["name"], sep, file["id"] = \
|
||||
file["filename"].rpartition("-")
|
||||
@@ -71,7 +71,7 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
|
||||
yield Message.Url, url, file
|
||||
|
||||
def fetch_album(self, album_id):
|
||||
url = "{}/api/album/get/{}".format(self.root, album_id)
|
||||
url = f"{self.root}/api/album/get/{album_id}"
|
||||
data = self.request(url).json()
|
||||
|
||||
return data["files"], {
|
||||
|
||||
Reference in New Issue
Block a user