|
|
@ -43,6 +43,7 @@ class DeviantartExtractor(Extractor):
|
|
|
|
|
|
|
|
|
|
|
|
def _init(self):
|
|
|
|
def _init(self):
|
|
|
|
self.jwt = self.config("jwt", False)
|
|
|
|
self.jwt = self.config("jwt", False)
|
|
|
|
|
|
|
|
self.png = self.config("png", False)
|
|
|
|
self.flat = self.config("flat", True)
|
|
|
|
self.flat = self.config("flat", True)
|
|
|
|
self.extra = self.config("extra", False)
|
|
|
|
self.extra = self.config("extra", False)
|
|
|
|
self.quality = self.config("quality", "100")
|
|
|
|
self.quality = self.config("quality", "100")
|
|
|
@ -65,6 +66,10 @@ class DeviantartExtractor(Extractor):
|
|
|
|
self.quality = ",q_{}".format(self.quality)
|
|
|
|
self.quality = ",q_{}".format(self.quality)
|
|
|
|
self.quality_sub = re.compile(r",q_\d+").sub
|
|
|
|
self.quality_sub = re.compile(r",q_\d+").sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.png:
|
|
|
|
|
|
|
|
self.png = "-fullview.png?"
|
|
|
|
|
|
|
|
self.png_sub = re.compile(r"-fullview\.[a-z0-9]+\?").sub
|
|
|
|
|
|
|
|
|
|
|
|
if self.original != "image":
|
|
|
|
if self.original != "image":
|
|
|
|
self._update_content = self._update_content_default
|
|
|
|
self._update_content = self._update_content_default
|
|
|
|
else:
|
|
|
|
else:
|
|
|
@ -345,6 +350,9 @@ class DeviantartExtractor(Extractor):
|
|
|
|
if self.quality:
|
|
|
|
if self.quality:
|
|
|
|
content["src"] = self.quality_sub(
|
|
|
|
content["src"] = self.quality_sub(
|
|
|
|
self.quality, content["src"], 1)
|
|
|
|
self.quality, content["src"], 1)
|
|
|
|
|
|
|
|
if self.png:
|
|
|
|
|
|
|
|
content["src"] = self.png_sub(
|
|
|
|
|
|
|
|
self.png, content["src"], 1)
|
|
|
|
|
|
|
|
|
|
|
|
return content
|
|
|
|
return content
|
|
|
|
|
|
|
|
|
|
|
|