simplify if statements by using walrus operators (#7671)

This commit is contained in:
Mike Fährmann
2025-07-22 18:34:38 +02:00
parent e8b2a496ba
commit a097a373a9
83 changed files with 239 additions and 466 deletions

View File

@@ -58,8 +58,7 @@ class FapachiUserExtractor(Extractor):
url = f"{self.root}/{self.user}/page/{self.num}"
page = self.request(url).text
for post in text.extract_iter(page, 'model-media-prew">', ">"):
path = text.extr(post, '<a href="', '"')
if path:
if path := text.extr(post, '<a href="', '"'):
yield Message.Queue, self.root + path, data
if '">Next page</a>' not in page: