remove build on adaas
This commit is contained in:
parent
e7149a1ae1
commit
cd03009eed
@ -3,4 +3,3 @@ v6d0auth @ git+https://gitea.parrrate.ru/PTV/v6d0auth.git@c718d4d1422945a756213d
|
||||
v6d1tokens @ git+https://gitea.parrrate.ru/PTV/v6d1tokens.git@9ada50f111bd6e9a49c9c6683fa7504fee030056
|
||||
v6d2ctx @ git+https://gitea.parrrate.ru/PTV/v6d2ctx.git@226bf1b6ada0c217408590abf69379d5f44a7972
|
||||
rainbowadn @ git+https://gitea.parrrate.ru/PTV/rainbowadn.git@fc1d11f4b53ac4653ffac1bbcad130855e1b7f10
|
||||
adaas @ git+https://gitea.parrrate.ru/PTV/adaas.git@8093665489901098f92d5a4001f1782dab6ddcf9
|
||||
|
@ -1,12 +1,12 @@
|
||||
import aiohttp
|
||||
|
||||
from adaas.cachedb import RemoteCache
|
||||
from v6d3music.utils.aextract import adaasurl
|
||||
|
||||
__all__ = ("real_url",)
|
||||
|
||||
|
||||
async def real_url(url: str, override: bool) -> str:
|
||||
base = RemoteCache().base
|
||||
base = adaasurl
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.post(
|
||||
f"{base}/resolve",
|
||||
|
@ -1,13 +1,16 @@
|
||||
import os
|
||||
|
||||
import aiohttp
|
||||
|
||||
from adaas.cachedb import RemoteCache
|
||||
__all__ = ("aextract", "adaasurl")
|
||||
|
||||
__all__ = ("aextract",)
|
||||
adaasurl = os.getenv("adaasurl", "http://adaas:5000")
|
||||
assert adaasurl is not None
|
||||
|
||||
|
||||
async def aextract(params: dict, url: str, **kwargs):
|
||||
async with aiohttp.ClientSession() as session:
|
||||
base = RemoteCache().base
|
||||
base = adaasurl
|
||||
async with session.post(f"{base}/extract", json=dict(params=params, url=url, **kwargs)) as resp:
|
||||
if resp.status != 200:
|
||||
raise IOError(resp.status)
|
||||
|
@ -88,6 +88,7 @@ class ArgCtx:
|
||||
except ValueError:
|
||||
raise Explicit("expected closing `]]`, not found")
|
||||
urls = args[:close_ix]
|
||||
assert isinstance(args, list)
|
||||
args = args[close_ix + 1 :]
|
||||
case ["]]", *args]:
|
||||
raise Explicit("unexpected `]]`")
|
||||
@ -104,7 +105,7 @@ class ArgCtx:
|
||||
raise Explicit(
|
||||
"expected url, got `+` or `-\"` or `-'`. maybe you forgot to separate control symbol from the effects?"
|
||||
)
|
||||
if 'youtu' in url and 'watch' in url and 'list' in url:
|
||||
if "youtu" in url and "watch" in url and "list" in url:
|
||||
raise Explicit(
|
||||
"bot cannot decide how to handle an URL with both `watch` and `list` in it.\n"
|
||||
"instead, use either `youtube.com/watch` URL without `&list=` part or `youtube.com/playlist` URL."
|
||||
|
Loading…
Reference in New Issue
Block a user