Fix options tables

This commit is contained in:
Ghost 2024-04-24 22:18:46 +02:00
parent 651f8a7e3c
commit ca6a50c851
3 changed files with 4 additions and 24 deletions

View File

@ -110,27 +110,7 @@ def get_moment_titles(domain: str, version: str, prefix: str):
def get_domain() -> str:
"""
Fetches the domain from a Telegra.ph API response.
Returns:
str: The domain extracted from the API response.
"""
console.print("[cyan]Make request api [white]...")
try:
response = requests.get("https://api.telegra.ph/getPage/Link-Aggiornato-StreamingCommunity-01-17", headers={'user-agent': get_headers()})
console.print(f"[green]Request response [white]=> [red]{response.status_code} \n")
response.raise_for_status() # Raise an error if request fails
if response.ok:
domain = response.json()['result']['description'].split(".")[1]
return domain
except Exception as e:
logging.error(f"Error fetching domain: {e}")
sys.exit(0)
pass
def test_site(domain: str) -> str:

View File

@ -109,7 +109,7 @@ class TVShowManager:
key = Prompt.ask("[cyan]Insert media [red]index [yellow]or [red](*) [cyan]to download all media [yellow]or [red][1-2] [cyan]for a range of media")
else:
choices = [str(i) for i in range(0, max_int_input)]
choices.append("")
choices.extend(['q', ""])
key = Prompt.ask("[cyan]Insert media [red]index", choices=choices, show_choices=False)
last_command = key
@ -133,7 +133,7 @@ class TVShowManager:
key = Prompt.ask("[cyan]Insert media [red]index [yellow]or [red](*) [cyan]to download all media [yellow]or [red][1-2] [cyan]for a range of media")
else:
choices = [str(i) for i in range(0, max_int_input)]
choices.append("")
choices.extend(['q', ""])
key = Prompt.ask("[cyan]Insert media [red]index", choices=choices, show_choices=False)
last_command = key

View File

@ -16,7 +16,7 @@
},
"SITE": {
"streaming_site_name": "streamingcommunity",
"streaming_domain": "africa",
"streaming_domain": "marketing",
"anime_site_name": "animeunity",
"anime_domain": "to"
},