[common] fix bug in df6f4e53 when first group is empty
This commit is contained in:
@@ -731,9 +731,8 @@ class GalleryExtractor(Extractor):
|
||||
def __init__(self, match, url=None):
|
||||
Extractor.__init__(self, match)
|
||||
|
||||
if url is None:
|
||||
path = self.groups[0]
|
||||
self.page_url = self.root + path if path[0] == "/" else None
|
||||
if url is None and (path := self.groups[0]) and path[0] == "/":
|
||||
self.page_url = f"{self.root}{path}"
|
||||
else:
|
||||
self.page_url = url
|
||||
|
||||
@@ -829,9 +828,8 @@ class MangaExtractor(Extractor):
|
||||
def __init__(self, match, url=None):
|
||||
Extractor.__init__(self, match)
|
||||
|
||||
if url is None:
|
||||
path = self.groups[0]
|
||||
self.page_url = self.root + path if path[0] == "/" else None
|
||||
if url is None and (path := self.groups[0]) and path[0] == "/":
|
||||
self.page_url = f"{self.root}{path}"
|
||||
else:
|
||||
self.page_url = url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user