Skip to content

Commit

Permalink
moved mangadex token url to consts
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonzorn committed Jan 28, 2024
1 parent b92189b commit 142a0c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions nlightreader/consts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

URL_MANGA_DEX = "https://mangadex.org"
URL_MANGA_DEX_API = "https://api.mangadex.org"
URL_MANGA_DEX_TOKEN = "https://auth.mangadex.org/realms/mangadex/protocol/openid-connect/token"

URL_RULATE = "https://tl.rulate.ru"
URL_EROLATE = "https://erolate.com"
Expand Down
6 changes: 3 additions & 3 deletions nlightreader/parsers/manga/mangadex_manga.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nlightreader.consts import URL_MANGA_DEX_API, URL_MANGA_DEX, Nl, MANGA_DEX_HEADERS
from nlightreader.consts import URL_MANGA_DEX_API, URL_MANGA_DEX, Nl, MANGA_DEX_HEADERS, URL_MANGA_DEX_TOKEN
from nlightreader.items import Manga, Chapter, Image, Genre, RequestForm, User, Kind
from nlightreader.parsers.catalog import LibParser
from nlightreader.parsers.catalogs_base import AbstractMangaCatalog
Expand Down Expand Up @@ -223,7 +223,7 @@ def update_token(self, token: dict):
def refresh_token(self):
request_data = self._refresh_headers
response = make_request(
"https://auth.mangadex.org/realms/mangadex/protocol/openid-connect/token",
URL_MANGA_DEX_TOKEN,
"POST",
data=request_data,
content_type="json",
Expand All @@ -237,7 +237,7 @@ def refresh_token(self):
def auth_login(self, params):
request_data = self._auth_headers | params
response = make_request(
"https://auth.mangadex.org/realms/mangadex/protocol/openid-connect/token",
URL_MANGA_DEX_TOKEN,
"POST",
data=request_data,
content_type="json",
Expand Down

0 comments on commit 142a0c2

Please sign in to comment.