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

@@ -30,7 +30,7 @@ class PictoaImageExtractor(PictoaExtractor):
def items(self):
album_id, image_id = self.groups
url = "{}/albums/{}/{}.html".format(self.root, album_id, image_id)
url = f"{self.root}/albums/{album_id}/{image_id}.html"
page = self.request(url).text
album_title = text.extr(page, 'property="og:title" content="', '"')
image_url = text.extr(page, 'property="og:image" content="', '"')
@@ -55,7 +55,7 @@ class PictoaAlbumExtractor(PictoaExtractor):
def items(self):
album_id = self.groups[0]
url = "{}/albums/{}.html".format(self.root, album_id)
url = f"{self.root}/albums/{album_id}.html"
page = self.request(url).text
album_data = {