mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 12:05:35 +00:00
fix no title
This commit is contained in:
parent
7992532ce9
commit
981494cfa7
@ -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}")
|
||||
|
@ -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']
|
||||
|
@ -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")
|
||||
|
23
run.py
23
run.py
@ -41,20 +41,23 @@ def main():
|
||||
db_title = Page.search(film_search, domain)
|
||||
display_search_results(db_title)
|
||||
|
||||
index_select = int(msg.ask("\n[blue]Index to download: "))
|
||||
if len(db_title) != 0:
|
||||
index_select = int(msg.ask("\n[blue]Index to download: "))
|
||||
|
||||
if 0 <= index_select <= len(db_title) - 1:
|
||||
selected_title = db_title[index_select]
|
||||
if 0 <= index_select <= len(db_title) - 1:
|
||||
selected_title = db_title[index_select]
|
||||
|
||||
if selected_title['type'] == "movie":
|
||||
console.print(f"[green]\nMovie select: {selected_title['name']}")
|
||||
download_film(selected_title['id'], selected_title['slug'], domain)
|
||||
else:
|
||||
console.print(f"[green]\nTv select: {selected_title['name']}")
|
||||
download_tv(selected_title['id'], selected_title['slug'], site_version, domain)
|
||||
|
||||
if selected_title['type'] == "movie":
|
||||
console.print(f"[green]\nMovie select: {selected_title['name']}")
|
||||
download_film(selected_title['id'], selected_title['slug'], domain)
|
||||
else:
|
||||
console.print(f"[green]\nTv select: {selected_title['name']}")
|
||||
download_tv(selected_title['id'], selected_title['slug'], site_version, domain)
|
||||
|
||||
console.print("[red]Wrong index for selection")
|
||||
else:
|
||||
console.print("[red]Wrong index for selection")
|
||||
console.print("[red]Cant find a single element")
|
||||
|
||||
console.print("\n[red]Done")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user