mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-06 17:53:40 -08:00
fix: wrong code formating
This commit is contained in:
@@ -27,8 +27,7 @@ def login(config: Config, status):
|
|||||||
exit_app()
|
exit_app()
|
||||||
# ---- new loggin -----
|
# ---- new loggin -----
|
||||||
print(
|
print(
|
||||||
f"A browser session will be opened ( [link]{
|
f"A browser session will be opened ( [link]{config.fastanime_anilist_app_login_url}[/link] )",
|
||||||
config.fastanime_anilist_app_login_url}[/link] )",
|
|
||||||
)
|
)
|
||||||
webbrowser.open(config.fastanime_anilist_app_login_url)
|
webbrowser.open(config.fastanime_anilist_app_login_url)
|
||||||
print("Please paste the token provided here")
|
print("Please paste the token provided here")
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ def notifier(config: Config):
|
|||||||
id = notification_["media"]["id"]
|
id = notification_["media"]["id"]
|
||||||
if past_notifications.get(str(id)) == notification_["episode"]:
|
if past_notifications.get(str(id)) == notification_["episode"]:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"skipping id={id} title={anime_title} episode={
|
f"skipping id={id} title={anime_title} episode={anime_episode} already notified"
|
||||||
anime_episode} already notified"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -508,8 +508,7 @@ def anilist_options(config, anilist_config: QueryDict):
|
|||||||
|
|
||||||
def _remove_from_list(config: Config, anilist_config: QueryDict):
|
def _remove_from_list(config: Config, anilist_config: QueryDict):
|
||||||
if Confirm.ask(
|
if Confirm.ask(
|
||||||
f"Are you sure you want to procede, the folowing action will permanently remove {
|
f"Are you sure you want to procede, the folowing action will permanently remove {selected_anime_title} from your list and your progress will be erased",
|
||||||
selected_anime_title} from your list and your progress will be erased",
|
|
||||||
default=False,
|
default=False,
|
||||||
):
|
):
|
||||||
success, data = AniList.delete_medialist_entry(selected_anime["id"])
|
success, data = AniList.delete_medialist_entry(selected_anime["id"])
|
||||||
|
|||||||
@@ -155,9 +155,7 @@ class AllAnimeAPI:
|
|||||||
yield {
|
yield {
|
||||||
"server": "gogoanime",
|
"server": "gogoanime",
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"]
|
allanime_episode["notes"] or f'{anime["title"]}'
|
||||||
or f'{
|
|
||||||
anime["title"]}'
|
|
||||||
)
|
)
|
||||||
+ f"; Episode {episode_number}",
|
+ f"; Episode {episode_number}",
|
||||||
"links": resp.json()["links"],
|
"links": resp.json()["links"],
|
||||||
@@ -167,9 +165,7 @@ class AllAnimeAPI:
|
|||||||
yield {
|
yield {
|
||||||
"server": "wetransfer",
|
"server": "wetransfer",
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"]
|
allanime_episode["notes"] or f'{anime["title"]}'
|
||||||
or f'{
|
|
||||||
anime["title"]}'
|
|
||||||
)
|
)
|
||||||
+ f"; Episode {episode_number}",
|
+ f"; Episode {episode_number}",
|
||||||
"links": resp.json()["links"],
|
"links": resp.json()["links"],
|
||||||
@@ -179,9 +175,7 @@ class AllAnimeAPI:
|
|||||||
yield {
|
yield {
|
||||||
"server": "sharepoint",
|
"server": "sharepoint",
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"]
|
allanime_episode["notes"] or f'{anime["title"]}'
|
||||||
or f'{
|
|
||||||
anime["title"]}'
|
|
||||||
)
|
)
|
||||||
+ f"; Episode {episode_number}",
|
+ f"; Episode {episode_number}",
|
||||||
"links": resp.json()["links"],
|
"links": resp.json()["links"],
|
||||||
@@ -191,9 +185,7 @@ class AllAnimeAPI:
|
|||||||
yield {
|
yield {
|
||||||
"server": "dropbox",
|
"server": "dropbox",
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"]
|
allanime_episode["notes"] or f'{anime["title"]}'
|
||||||
or f'{
|
|
||||||
anime["title"]}'
|
|
||||||
)
|
)
|
||||||
+ f"; Episode {episode_number}",
|
+ f"; Episode {episode_number}",
|
||||||
"links": resp.json()["links"],
|
"links": resp.json()["links"],
|
||||||
@@ -203,9 +195,7 @@ class AllAnimeAPI:
|
|||||||
yield {
|
yield {
|
||||||
"server": "wixmp",
|
"server": "wixmp",
|
||||||
"episode_title": (
|
"episode_title": (
|
||||||
allanime_episode["notes"]
|
allanime_episode["notes"] or f'{anime["title"]}'
|
||||||
or f'{
|
|
||||||
anime["title"]}'
|
|
||||||
)
|
)
|
||||||
+ f"; Episode {episode_number}",
|
+ f"; Episode {episode_number}",
|
||||||
"links": resp.json()["links"],
|
"links": resp.json()["links"],
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from .constants import ANIMEPAHE_BASE, ANIMEPAHE_ENDPOINT, REQUEST_HEADERS
|
|||||||
|
|
||||||
|
|
||||||
class AnimePaheApi:
|
class AnimePaheApi:
|
||||||
|
|
||||||
def search_for_anime(self, user_query, *args):
|
def search_for_anime(self, user_query, *args):
|
||||||
try:
|
try:
|
||||||
url = f"{ANIMEPAHE_ENDPOINT}m=search&q={user_query}"
|
url = f"{ANIMEPAHE_ENDPOINT}m=search&q={user_query}"
|
||||||
@@ -32,8 +31,7 @@ class AnimePaheApi:
|
|||||||
|
|
||||||
def get_anime(self, session_id: str, *args):
|
def get_anime(self, session_id: str, *args):
|
||||||
url = "https://animepahe.ru/api?m=release&id=&sort=episode_asc&page=1"
|
url = "https://animepahe.ru/api?m=release&id=&sort=episode_asc&page=1"
|
||||||
url = f"{ANIMEPAHE_ENDPOINT}m=release&id={
|
url = f"{ANIMEPAHE_ENDPOINT}m=release&id={session_id}&sort=episode_asc&page=1"
|
||||||
session_id}&sort=episode_asc&page=1"
|
|
||||||
response = requests.get(url, headers=REQUEST_HEADERS)
|
response = requests.get(url, headers=REQUEST_HEADERS)
|
||||||
if not response.status_code == 200:
|
if not response.status_code == 200:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user