mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
fix error 409
This commit is contained in:
parent
38a666e53d
commit
7992532ce9
@ -18,7 +18,13 @@ def get_iframe(id_title, domain):
|
||||
if req.ok:
|
||||
url_embed = BeautifulSoup(req.text, "lxml").find("iframe").get("src")
|
||||
req_embed = requests.get(url_embed, headers = {"User-agent": get_headers()}).text
|
||||
return BeautifulSoup(req_embed, "lxml").find("body").find("script").text
|
||||
|
||||
try:
|
||||
return BeautifulSoup(req_embed, "lxml").find("body").find("script").text
|
||||
except:
|
||||
console.log("[red]Cant play this video, (video not available)")
|
||||
sys.exit(0)
|
||||
|
||||
else:
|
||||
console.log(f"[red]Error: {req.status_code}")
|
||||
sys.exit(0)
|
||||
|
@ -5,14 +5,19 @@ from Src.Util.Helper.headers import get_headers
|
||||
from Src.Util.Helper.console import console
|
||||
|
||||
# General import
|
||||
import requests, sys
|
||||
import requests, sys, json
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
def domain_version():
|
||||
|
||||
req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json", headers={'user-agent': get_headers()})
|
||||
|
||||
if req_repo.ok:
|
||||
return req_repo.json()['domain'], req_repo.json()['version']
|
||||
site_req = requests.get(f"https://streamingcommunity.{req_repo.json()['domain']}/").text
|
||||
soup = BeautifulSoup(site_req, "lxml")
|
||||
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
|
||||
|
||||
return version, req_repo.json()['version']
|
||||
|
||||
else:
|
||||
console.log(f"[red]Error: {req_repo.status_code}")
|
||||
|
@ -15,7 +15,12 @@ def merge_ts_files(video_path, audio_path, output_path):
|
||||
input_audio = ffmpeg.input(audio_path)
|
||||
logging.debug(f"Merge video ts: {input_video}, with audio ts: {input_audio}, to: {output_path}")
|
||||
|
||||
ffmpeg_command = ffmpeg.output(input_video, input_audio, output_path, format='mpegts', acodec='copy', vcodec='copy', loglevel='quiet').compile()
|
||||
ffmpeg_command = ffmpeg.output(input_video, input_audio, output_path,
|
||||
format='mpegts',
|
||||
acodec='copy',
|
||||
vcodec='copy',
|
||||
loglevel='quiet',
|
||||
).compile()
|
||||
|
||||
try:
|
||||
subprocess.run(ffmpeg_command, check=True, stderr=subprocess.PIPE)
|
||||
|
@ -6,4 +6,3 @@ rich
|
||||
random-user-agent
|
||||
ffmpeg-python
|
||||
cryptography==3.4.8 # Problem with new version
|
||||
moviepy
|
||||
|
Loading…
x
Reference in New Issue
Block a user