diff --git a/grawlix/sources/nextory.py b/grawlix/sources/nextory.py index b68761d..4c88f28 100644 --- a/grawlix/sources/nextory.py +++ b/grawlix/sources/nextory.py @@ -30,7 +30,7 @@ class Nextory(Source): self._client.headers.update( { "X-Application-Id": "200", - "X-App-Version": "5.4.1", + "X-App-Version": "2026.05.4", "X-Locale": LOCALE, "X-Model": "Personal Computer", "X-Device-Id": device_id, @@ -139,9 +139,10 @@ class Nextory(Source): @staticmethod def _extract_series_name(product_info: dict) -> Optional[str]: - if not "series" in product_info: + series = product_info.get("series") + if not series: return None - return product_info["series"]["name"] + return series["name"] async def _get_book_id_from_url_id(self, url_id: str) -> str: diff --git a/grawlix/sources/saxo.py b/grawlix/sources/saxo.py index 77731ae..0d59b95 100644 --- a/grawlix/sources/saxo.py +++ b/grawlix/sources/saxo.py @@ -122,7 +122,7 @@ class Saxo(Source): :param url: Url of book :returns: Isbn of book """ - isbn_match = re.search(f"\d+$", url) + isbn_match = re.search(r"\d+$", url) if isbn_match and isbn_match.group(): return isbn_match.group() raise NotImplemented diff --git a/pyproject.toml b/pyproject.toml index 83ffec8..ebf2958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ dependencies = [ "pycryptodome", "rich", "tomli", + "urllib3", ] dynamic = ["version"]