implement 'text.root_from_url()'
use domain from input URL for kemono
This commit is contained in:
@@ -621,8 +621,7 @@ class BaseExtractor(Extractor):
|
||||
if index:
|
||||
self.category, self.root = self.instances[index-1]
|
||||
if not self.root:
|
||||
url = text.ensure_http_scheme(match.group(0))
|
||||
self.root = url[:url.index("/", 8)]
|
||||
self.root = text.root_from_url(match.group(0))
|
||||
else:
|
||||
self.root = group
|
||||
self.category = group.partition("://")[2]
|
||||
|
||||
@@ -30,8 +30,8 @@ class KemonopartyExtractor(Extractor):
|
||||
def __init__(self, match):
|
||||
if match.group(1) == "coomer":
|
||||
self.category = "coomerparty"
|
||||
self.root = "https://coomer.party"
|
||||
self.cookiedomain = ".coomer.party"
|
||||
self.root = text.root_from_url(match.group(0))
|
||||
Extractor.__init__(self, match)
|
||||
|
||||
def items(self):
|
||||
|
||||
Reference in New Issue
Block a user