1. add stealth to avoid detect

This commit is contained in:
pookz@stme
2024-06-14 14:51:24 +08:00
parent 5ff8adda06
commit 096f5f87c2
8 changed files with 49 additions and 23 deletions
+9
View File
@@ -1,5 +1,8 @@
from pathlib import Path
from typing import List
from conf import BASE_DIR
SOCIAL_MEDIA_DOUYIN = "douyin"
SOCIAL_MEDIA_TENCENT = "tencent"
SOCIAL_MEDIA_TIKTOK = "tiktok"
@@ -12,3 +15,9 @@ def get_supported_social_media() -> List[str]:
def get_cli_action() -> List[str]:
return ["upload", "login", "watch"]
async def set_init_script(context):
stealth_js_path = Path(BASE_DIR / "utils/stealth.min.js")
await context.add_init_script(path=stealth_js_path)
return context