调整抖音解析为付费接口

This commit is contained in:
liuwei
2025-10-10 08:49:20 +08:00
parent d44007d42d
commit e2173ab1e4

View File

@@ -197,9 +197,17 @@ class DouyinParserPlugin(MessagePluginInterface):
"""解析抖音链接"""
try:
api_url = "https://api.pearktrue.cn/api/video/douyin/?url="
pay_api_url = "https://api.pearktrue.cn/api/video/api.php"
clean_url = self._clean_url(url)
api_url = api_url + clean_url
response = requests.get(api_url, timeout=30)
# api_url = api_url + clean_url
# response = requests.get(api_url, timeout=30)
# 切换付费模式
# 发送请求
params = {
"url": clean_url,
"key": "f56c1fed0c6e64e7"
}
response = requests.post(pay_api_url, params=params, timeout=30)
if response.status_code != 200:
raise DouyinParserError(f"API请求失败状态码: {response.status_code}")