mirror of
https://github.com/jo1gi/grawlix.git
synced 2025-12-16 04:09:10 +00:00
commit
f9be630241
@ -26,7 +26,7 @@ class Metadata:
|
|||||||
"language": self.language or "UNKNOWN",
|
"language": self.language or "UNKNOWN",
|
||||||
"authors": "; ".join(self.authors),
|
"authors": "; ".join(self.authors),
|
||||||
"description": self.description or "UNKNOWN",
|
"description": self.description or "UNKNOWN",
|
||||||
"relase_date": self.release_date.isoformat() if self.release_date else "UNKNOWN",
|
"release_date": self.release_date.isoformat() if self.release_date else "UNKNOWN",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class DcUniverseInfinite(Source):
|
|||||||
images.append(OnlineFile(
|
images.append(OnlineFile(
|
||||||
url = page["signed_url"],
|
url = page["signed_url"],
|
||||||
extension = "jpg",
|
extension = "jpg",
|
||||||
encryption = DcUniverseInfinteEncryption(uuid, page_number, job_id, format_id)
|
encryption = DcUniverseInfiniteEncryption(uuid, page_number, job_id, format_id)
|
||||||
))
|
))
|
||||||
return ImageList(images)
|
return ImageList(images)
|
||||||
|
|
||||||
@ -142,14 +142,14 @@ class DcUniverseInfinite(Source):
|
|||||||
|
|
||||||
|
|
||||||
async def download_plan(self) -> str:
|
async def download_plan(self) -> str:
|
||||||
"""Download user subscribtion plan"""
|
"""Download user subscription plan"""
|
||||||
response = await self._client.get(
|
response = await self._client.get(
|
||||||
"https://www.dcuniverseinfinite.com/api/claims/?trans=en"
|
"https://www.dcuniverseinfinite.com/api/claims/?trans=en"
|
||||||
)
|
)
|
||||||
return response.json()["data"]["urn:df:clm:premium"]["plan"]
|
return response.json()["data"]["urn:df:clm:premium"]["plan"]
|
||||||
|
|
||||||
|
|
||||||
class DcUniverseInfinteEncryption:
|
class DcUniverseInfiniteEncryption:
|
||||||
key: bytes
|
key: bytes
|
||||||
|
|
||||||
def __init__(self, uuid: str, page_number: int, job_id: str, format_id: str):
|
def __init__(self, uuid: str, page_number: int, job_id: str, format_id: str):
|
||||||
|
|||||||
@ -102,7 +102,7 @@ class Saxo(Source):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _extract_metadata(metadata: dict) -> Metadata:
|
def _extract_metadata(metadata: dict) -> Metadata:
|
||||||
"""
|
"""
|
||||||
Extract metadata from matadata response from Saxo
|
Extract metadata from metadata response from Saxo
|
||||||
|
|
||||||
:param metadata: Metadata response from saxo
|
:param metadata: Metadata response from saxo
|
||||||
:returns: Metadata formatted as `grawlix.Metadata`
|
:returns: Metadata formatted as `grawlix.Metadata`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user