replace old %-formatted and .format(…) strings with f-strings (#7671)

mostly using flynt
https://github.com/ikamensh/flynt
This commit is contained in:
Mike Fährmann
2025-06-28 19:36:16 +02:00
parent f77e98b57d
commit 9dbe33b6de
167 changed files with 756 additions and 891 deletions

View File

@@ -32,7 +32,7 @@ class CyberdropAlbumExtractor(lolisafe.LolisafeAlbumExtractor):
yield Message.Url, file["url"], file
def fetch_album(self, album_id):
url = "{}/a/{}".format(self.root, album_id)
url = f"{self.root}/a/{album_id}"
page = self.request(url).text
extr = text.extract_from(page)
@@ -60,7 +60,7 @@ class CyberdropAlbumExtractor(lolisafe.LolisafeAlbumExtractor):
def _extract_files(self, file_ids):
for file_id in file_ids:
try:
url = "{}/api/file/info/{}".format(self.root_api, file_id)
url = f"{self.root_api}/api/file/info/{file_id}"
file = self.request(url).json()
auth = self.request(file["auth_url"]).json()
file["url"] = auth["url"]