mirror of
https://github.com/jo1gi/grawlix.git
synced 2026-03-27 13:49:58 -06:00
fix: resolve compatibility issues from upstream rebase
- Fix f-string quote syntax in ereolen.py for Python < 3.12 - Fix Storytel login signature to match new url parameter - Fix Nextory API field names (identifier vs isbn confusion)
This commit is contained in:
parent
476d460846
commit
ed8fe9eafa
@ -23,7 +23,7 @@ class Ereolen(Source):
|
||||
.read_text("utf8") \
|
||||
.split("\n")
|
||||
match: list[str] = [
|
||||
rf"https://(www.)?({"|".join(library_domains)})/reader\?orderid=.+$",
|
||||
rf"https://(www.)?({'|'.join(library_domains)})/reader\?orderid=.+$",
|
||||
]
|
||||
_authentication_methods = [ "login" ]
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ class Nextory(Source):
|
||||
session_response = await self._client.post(
|
||||
"https://api.nextory.com/user/v1/sessions",
|
||||
json = {
|
||||
"isbn": username,
|
||||
"identifier": username,
|
||||
"password": password
|
||||
},
|
||||
)
|
||||
@ -144,7 +144,7 @@ class Nextory(Source):
|
||||
for format_type in ("epub", "pdf"):
|
||||
for fmt in product_data["formats"]:
|
||||
if fmt["type"] == format_type:
|
||||
return (format_type, fmt["isbn"])
|
||||
return (format_type, fmt["identifier"])
|
||||
raise InvalidUrl
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ class Storytel(Source):
|
||||
|
||||
# Authentication methods
|
||||
|
||||
async def login(self, username: str, password: str, **kwargs) -> None:
|
||||
async def login(self, url: str, username: str, password: str) -> None:
|
||||
self.__username = username
|
||||
self.__password = self.encrypt_password(password)
|
||||
self._client.headers.update({"User-Agent": "Storytel/23.49 (Android 13; Pixel 6) Release/2288481"})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user