summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/fapello.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/fapello.py')
-rw-r--r--gallery_dl/extractor/fapello.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/gallery_dl/extractor/fapello.py b/gallery_dl/extractor/fapello.py
index cf18edc..b961cbe 100644
--- a/gallery_dl/extractor/fapello.py
+++ b/gallery_dl/extractor/fapello.py
@@ -25,11 +25,11 @@ class FapelloPostExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
+ self.root = text.root_from_url(match[0])
self.model, self.id = match.groups()
def items(self):
- url = "{}/{}/{}/".format(self.root, self.model, self.id)
+ url = f"{self.root}/{self.model}/{self.id}/"
page = text.extr(
self.request(url, allow_redirects=False).text,
'class="uk-align-center"', "</div>", None)
@@ -59,15 +59,14 @@ class FapelloModelExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
- self.model = match.group(1)
+ self.root = text.root_from_url(match[0])
+ self.model = match[1]
def items(self):
num = 1
data = {"_extractor": FapelloPostExtractor}
while True:
- url = "{}/ajax/model/{}/page-{}/".format(
- self.root, self.model, num)
+ url = f"{self.root}/ajax/model/{self.model}/page-{num}/"
page = self.request(url).text
if not page:
return
@@ -93,8 +92,8 @@ class FapelloPathExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
- self.root = text.root_from_url(match.group(0))
- self.path = match.group(1)
+ self.root = text.root_from_url(match[0])
+ self.path = match[1]
def items(self):
num = 1
@@ -109,8 +108,8 @@ class FapelloPathExtractor(Extractor):
data = {"_extractor": FapelloModelExtractor}
while True:
- page = self.request("{}/ajax/{}/page-{}/".format(
- self.root, self.path, num)).text
+ url = f"{self.root}/ajax/{self.path}/page-{num}/"
+ page = self.request(url).text
if not page:
return