mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 03:55:24 +00:00
Fix github error ...
This commit is contained in:
parent
6fd433aac3
commit
12103515ab
@ -5,7 +5,7 @@ import time
|
||||
|
||||
|
||||
# Internal utilities
|
||||
from .version import __version__
|
||||
from .version import __version__, __author__, __title__
|
||||
from Src.Util.console import console
|
||||
|
||||
|
||||
@ -14,8 +14,6 @@ import httpx
|
||||
|
||||
|
||||
# Variable
|
||||
repo_name = "StreamingCommunity_api"
|
||||
repo_user = "ghost6446"
|
||||
main = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
@ -28,8 +26,8 @@ def update():
|
||||
|
||||
# Make the GitHub API requests and handle potential errors
|
||||
try:
|
||||
response_reposity = httpx.get(f"https://api.github.com/repos/{repo_user}/{repo_name}").json()
|
||||
response_releases = httpx.get(f"https://api.github.com/repos/{repo_user}/{repo_name}/releases").json()
|
||||
response_reposity = httpx.get(f"https://api.github.com/repos/{__author__}/{__title__}").json()
|
||||
response_releases = httpx.get(f"https://api.github.com/repos/{__author__}/{__title__}/releases").json()
|
||||
|
||||
except Exception as e:
|
||||
console.print(f"[red]Error accessing GitHub API: {e}")
|
||||
@ -60,7 +58,7 @@ def update():
|
||||
console.print(f"[red]Everything is up to date")
|
||||
|
||||
console.print("\n")
|
||||
console.print(f"[red]{repo_name} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
|
||||
console.print(f"[red]{__title__} has been downloaded [yellow]{total_download_count} [red]times, but only [yellow]{percentual_stars}% [red]of users have starred it.\n\
|
||||
[cyan]Help the repository grow today by leaving a [yellow]star [cyan]and [yellow]sharing [cyan]it with others online!")
|
||||
|
||||
console.print("\n")
|
||||
|
@ -1,5 +1,5 @@
|
||||
__title__ = 'StreamingCommunity'
|
||||
__version__ = 'v1.1.0'
|
||||
__version__ = 'v1.2.0'
|
||||
__author__ = 'Lovi-0'
|
||||
__description__ = 'A command-line program to download film'
|
||||
__copyright__ = 'Copyright 2024'
|
||||
|
Loading…
x
Reference in New Issue
Block a user