调整抖音解析为付费接口
This commit is contained in:
@@ -197,9 +197,17 @@ class DouyinParserPlugin(MessagePluginInterface):
|
|||||||
"""解析抖音链接"""
|
"""解析抖音链接"""
|
||||||
try:
|
try:
|
||||||
api_url = "https://api.pearktrue.cn/api/video/douyin/?url="
|
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)
|
clean_url = self._clean_url(url)
|
||||||
api_url = api_url + clean_url
|
# api_url = api_url + clean_url
|
||||||
response = requests.get(api_url, timeout=30)
|
# 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:
|
if response.status_code != 200:
|
||||||
raise DouyinParserError(f"API请求失败,状态码: {response.status_code}")
|
raise DouyinParserError(f"API请求失败,状态码: {response.status_code}")
|
||||||
|
|||||||
Reference in New Issue
Block a user