mirror of
https://github.com/jo1gi/grawlix.git
synced 2025-12-16 04:09:10 +00:00
Fix eReolen reader urls ending with a /
This commit is contained in:
parent
ee8b9e4d64
commit
98306c0351
@ -17,7 +17,7 @@ KEY_ENCRYPTION_IV = bytes([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])
|
|||||||
class Ereolen(Source):
|
class Ereolen(Source):
|
||||||
name: str = "eReolen"
|
name: str = "eReolen"
|
||||||
match: list[str] = [
|
match: list[str] = [
|
||||||
r"https://ereolen.dk/ting/object/\d+-.+/read",
|
r"https://ereolen.dk/ting/object/\d+-.+/read/?$",
|
||||||
r"https://ereolen.dk/ting/object/\d+-[^/]+/?$"
|
r"https://ereolen.dk/ting/object/\d+-[^/]+/?$"
|
||||||
]
|
]
|
||||||
_authentication_methods = [ "login" ]
|
_authentication_methods = [ "login" ]
|
||||||
@ -112,6 +112,8 @@ class Ereolen(Source):
|
|||||||
:returns: Book id
|
:returns: Book id
|
||||||
"""
|
"""
|
||||||
if re.match(self.match[0], url):
|
if re.match(self.match[0], url):
|
||||||
|
if url.endswith("/"):
|
||||||
|
url = url[:-1]
|
||||||
return await self._get_book_id_from_reader(url)
|
return await self._get_book_id_from_reader(url)
|
||||||
if re.match(self.match[1], url):
|
if re.match(self.match[1], url):
|
||||||
return await self._get_book_id_from_reader(f"{url}/read")
|
return await self._get_book_id_from_reader(f"{url}/read")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user