This commit is contained in:
parent
491f81dd2a
commit
269ece679f
@ -115,7 +115,9 @@ class ProxyElem:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
async with self.local() as session:
|
async with self.local() as session:
|
||||||
resp = await session.post(proxy_server, json=json.loads(request_data.json()))
|
resp = await session.post(
|
||||||
|
proxy_server, json=json.loads(request_data.json())
|
||||||
|
)
|
||||||
response_data = cast(
|
response_data = cast(
|
||||||
ProxyResponse, ProxyResponse.parse_raw(await resp.text())
|
ProxyResponse, ProxyResponse.parse_raw(await resp.text())
|
||||||
)
|
)
|
||||||
|
@ -168,7 +168,6 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
video_info.download = None
|
video_info.download = None
|
||||||
video_info.poster = proxied[2]
|
video_info.poster = proxied[2]
|
||||||
|
|
||||||
return (
|
|
||||||
if video_info.upstream:
|
if video_info.upstream:
|
||||||
video_info.upstream = str(video_info.upstream)
|
video_info.upstream = str(video_info.upstream)
|
||||||
if video_info.download:
|
if video_info.download:
|
||||||
@ -177,6 +176,8 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
video_info.poster = str(video_info.poster)
|
video_info.poster = str(video_info.poster)
|
||||||
if video_info.ctype:
|
if video_info.ctype:
|
||||||
video_info.ctype = str(video_info.ctype)
|
video_info.ctype = str(video_info.ctype)
|
||||||
|
|
||||||
|
return (
|
||||||
dataclasses.asdict(video_info),
|
dataclasses.asdict(video_info),
|
||||||
provider_data.meta(),
|
provider_data.meta(),
|
||||||
provider_data.title(),
|
provider_data.title(),
|
||||||
|
@ -9,6 +9,7 @@ import requests
|
|||||||
import yt_dlp as youtube_dl
|
import yt_dlp as youtube_dl
|
||||||
import config
|
import config
|
||||||
|
|
||||||
|
|
||||||
class DummyLogger:
|
class DummyLogger:
|
||||||
def debug(self, msg):
|
def debug(self, msg):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user