fix no title

This commit is contained in:
Ghost 2024-01-29 16:43:52 +01:00
parent 7992532ce9
commit 981494cfa7
4 changed files with 18 additions and 11 deletions

View File

@ -10,6 +10,7 @@ from bs4 import BeautifulSoup
def domain_version():
console.print("[green]Get rules ...")
req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json", headers={'user-agent': get_headers()})
if req_repo.ok:
@ -17,7 +18,7 @@ def domain_version():
soup = BeautifulSoup(site_req, "lxml")
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
return version, req_repo.json()['version']
return req_repo.json()['domain'], version
else:
console.log(f"[red]Error: {req_repo.status_code}")

View File

@ -19,6 +19,7 @@ def get_install_version():
return about['__version__']
def main_update():
console.print("[green]Checking github version ...")
json = requests.get(f"https://api.github.com/repos/{repo_user}/{repo_name}/releases").json()[0]
stargazers_count = requests.get(f"https://api.github.com/repos/{repo_user}/{repo_name}").json()['stargazers_count']

View File

@ -35,6 +35,8 @@ def download_ffmpeg():
def check_ffmpeg():
console.print("[green]Checking ffmpeg ...")
try:
subprocess.run(["ffmpeg", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
console.print("[blue]FFmpeg [white]=> [red]Add to system path")

3
run.py
View File

@ -41,6 +41,7 @@ def main():
db_title = Page.search(film_search, domain)
display_search_results(db_title)
if len(db_title) != 0:
index_select = int(msg.ask("\n[blue]Index to download: "))
if 0 <= index_select <= len(db_title) - 1:
@ -55,6 +56,8 @@ def main():
else:
console.print("[red]Wrong index for selection")
else:
console.print("[red]Cant find a single element")
console.print("\n[red]Done")