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():
|
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()})
|
req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json", headers={'user-agent': get_headers()})
|
||||||
|
|
||||||
if req_repo.ok:
|
if req_repo.ok:
|
||||||
@ -17,7 +18,7 @@ def domain_version():
|
|||||||
soup = BeautifulSoup(site_req, "lxml")
|
soup = BeautifulSoup(site_req, "lxml")
|
||||||
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
|
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:
|
else:
|
||||||
console.log(f"[red]Error: {req_repo.status_code}")
|
console.log(f"[red]Error: {req_repo.status_code}")
|
||||||
|
@ -19,6 +19,7 @@ def get_install_version():
|
|||||||
return about['__version__']
|
return about['__version__']
|
||||||
|
|
||||||
def main_update():
|
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]
|
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']
|
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():
|
def check_ffmpeg():
|
||||||
|
|
||||||
|
console.print("[green]Checking ffmpeg ...")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.run(["ffmpeg", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
subprocess.run(["ffmpeg", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
||||||
console.print("[blue]FFmpeg [white]=> [red]Add to system path")
|
console.print("[blue]FFmpeg [white]=> [red]Add to system path")
|
||||||
|
3
run.py
3
run.py
@ -41,6 +41,7 @@ def main():
|
|||||||
db_title = Page.search(film_search, domain)
|
db_title = Page.search(film_search, domain)
|
||||||
display_search_results(db_title)
|
display_search_results(db_title)
|
||||||
|
|
||||||
|
if len(db_title) != 0:
|
||||||
index_select = int(msg.ask("\n[blue]Index to download: "))
|
index_select = int(msg.ask("\n[blue]Index to download: "))
|
||||||
|
|
||||||
if 0 <= index_select <= len(db_title) - 1:
|
if 0 <= index_select <= len(db_title) - 1:
|
||||||
@ -55,6 +56,8 @@ def main():
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
console.print("[red]Wrong index for selection")
|
console.print("[red]Wrong index for selection")
|
||||||
|
else:
|
||||||
|
console.print("[red]Cant find a single element")
|
||||||
|
|
||||||
console.print("\n[red]Done")
|
console.print("\n[red]Done")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user