默认同时只登一个号,失败两次跳下一个,号间留间隔,结束后可一键重试失败账号。 顺带拆分虎牙路由与斗鱼工作台页面,并补齐 raw_cookie 重建入口。 Co-authored-by: Cursor <cursoragent@cursor.com>
103 lines
2.6 KiB
Python
103 lines
2.6 KiB
Python
"""虎牙 API:按账号 / 登录 / 注册 / Cookie / 工作台 / 设备拆分。"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from .accounts import (
|
|
assign_account,
|
|
batch_assign_accounts,
|
|
batch_tag,
|
|
batch_tag_selection,
|
|
create_browser_exchange_kit,
|
|
delete_account,
|
|
delete_accounts_batch,
|
|
delete_accounts_batch_selection,
|
|
import_cookies,
|
|
import_password_accounts,
|
|
list_accounts,
|
|
list_huya_account_ids,
|
|
list_tags,
|
|
set_account_tag,
|
|
)
|
|
from .accounts import router as accounts_router
|
|
from .cookies import router as cookies_router
|
|
from .devices import router as devices_router
|
|
from .login import (
|
|
app_password_login_account,
|
|
app_password_login_selected_accounts,
|
|
auto_sms_login_account,
|
|
fetch_account_sms_code,
|
|
password_login_account,
|
|
password_login_selected_accounts,
|
|
send_sms_code,
|
|
sms_login_account,
|
|
test_sms_url_endpoint,
|
|
)
|
|
from .login import router as login_router
|
|
from .register import router as register_router
|
|
from .workbench import (
|
|
cleanup_orphan_tasks,
|
|
create_task_batch,
|
|
get_config,
|
|
get_task,
|
|
list_goods,
|
|
list_huya_workbench_accounts,
|
|
list_recharge_goods,
|
|
list_tasks,
|
|
stop_batch,
|
|
task_types,
|
|
tasks_summary,
|
|
update_config,
|
|
update_huya_workbench_accounts,
|
|
ws_huya_logs,
|
|
)
|
|
from .workbench import router as workbench_router
|
|
|
|
router = APIRouter(prefix="/api/huya", tags=["虎牙"])
|
|
router.include_router(accounts_router)
|
|
router.include_router(login_router)
|
|
router.include_router(register_router)
|
|
router.include_router(cookies_router)
|
|
router.include_router(workbench_router)
|
|
router.include_router(devices_router)
|
|
|
|
__all__ = [
|
|
"app_password_login_account",
|
|
"app_password_login_selected_accounts",
|
|
"assign_account",
|
|
"auto_sms_login_account",
|
|
"batch_assign_accounts",
|
|
"batch_tag",
|
|
"batch_tag_selection",
|
|
"cleanup_orphan_tasks",
|
|
"create_browser_exchange_kit",
|
|
"create_task_batch",
|
|
"delete_account",
|
|
"delete_accounts_batch",
|
|
"delete_accounts_batch_selection",
|
|
"fetch_account_sms_code",
|
|
"get_config",
|
|
"get_task",
|
|
"import_cookies",
|
|
"import_password_accounts",
|
|
"list_accounts",
|
|
"list_goods",
|
|
"list_huya_account_ids",
|
|
"list_huya_workbench_accounts",
|
|
"list_recharge_goods",
|
|
"list_tags",
|
|
"list_tasks",
|
|
"password_login_account",
|
|
"password_login_selected_accounts",
|
|
"router",
|
|
"send_sms_code",
|
|
"set_account_tag",
|
|
"sms_login_account",
|
|
"stop_batch",
|
|
"task_types",
|
|
"tasks_summary",
|
|
"test_sms_url_endpoint",
|
|
"update_config",
|
|
"update_huya_workbench_accounts",
|
|
"ws_huya_logs",
|
|
]
|