当我尝试使用streamable
API创建抽搐剪辑的镜像时,我有时会收到以下错误:
ERROR: SnappyCallousSkirretSuperVinlin: Failed to parse JSON
(caused by ValueError("Expecting \',\' delimiter: line 38 column 76 (char 2027)",));
please report this issue on https://yt-dl.org/bug .
Make sure you are using the latest version;
see https://yt-dl.org/update on how to update.
Be sure to call youtube-dl with the --verbose flag and include its complete output.
此错误并非总能发生,但我找不到导致它的网址与不会导致错误的网址之间的任何差异。
我的代码:
import requests
url = 'https://clips.twitch.tv/SnappyCallousSkirretSuperVinlin'
api_url = 'https://api.streamable.com/import'
headers = {'User-Agent': 'clip bot'}
params = {'url': url}
r = requests.get(
api_url,
auth=('username', 'password'),
headers=headers,
params=params)
print(r.content)
streamable
API文档:https://streamable.com/documentation