replace old %-formatted and .format(…) strings with f-strings (#7671)
mostly using flynt https://github.com/ikamensh/flynt
This commit is contained in:
@@ -26,8 +26,7 @@ class SlidesharePresentationExtractor(GalleryExtractor):
|
||||
|
||||
def __init__(self, match):
|
||||
self.user, self.presentation = match.groups()
|
||||
url = "https://www.slideshare.net/{}/{}".format(
|
||||
self.user, self.presentation)
|
||||
url = f"https://www.slideshare.net/{self.user}/{self.presentation}"
|
||||
GalleryExtractor.__init__(self, match, url)
|
||||
|
||||
def metadata(self, page):
|
||||
@@ -47,11 +46,8 @@ class SlidesharePresentationExtractor(GalleryExtractor):
|
||||
|
||||
def images(self, page):
|
||||
slides = self.slideshow["slides"]
|
||||
begin = "{}/{}/95/{}-".format(
|
||||
slides["host"],
|
||||
slides["imageLocation"],
|
||||
slides["title"],
|
||||
)
|
||||
begin = (f"{slides['host']}/{slides['imageLocation']}"
|
||||
f"/95/{slides['title']}-")
|
||||
end = "-1024.jpg"
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user