Vtuber-recorder
Vtuber-recorder copied to clipboard
twitch监测脚本無反應
我有填入用戶端id 但是log都顯示The stream is not available now.
我读了一下新版本的twitchapi,他的v5添加了新的验证
在命令行里运行这个,按照你这个页面的数据,填写MY_ID(用户端ID),MY_SECRET(用户端密码(点击新密码生成用户端密码))
curl -X POST "https://id.twitch.tv/oauth2/token?client_id=MY_ID&client_secret=MY_SECRET&grant_type=client_credentials"
然后这条命令会输出一个token,这个token会产生一个60天有效期的token
这个token修改到record_twitch.sh
record_twitch.sh代码我已经做了修改
curl -H 'Accept: application/vnd.twitchtv.v5+json' \ -H 'Client-ID:clientid' \ -H 'Authorization: Bearer authkey' \ -X GET https://api.twitch.tv/helix/streams?user_login=$1|grep -q live&& break
clientid替换为之前的用户端ID,authkey替换为获取到的token
初始化的脚本后续我有空再做修改
我改了 clientid 和 authkey
但执行log显示25行错误
curl: (6) Could not resolve host: ; Unknown error
./record_twitch.sh: line 25: -X: command not found
还有脚本一开始的 请输入Twitchkey: 这里是填用户端ID还是authkey?
onekey还没有对当前改动做修改,以你手动修改的twitch脚本为准 这个问题我已经修复了,是24行最后多了一个空格,参数填写以上一条回复为准
还是有问题不能录
[2022-05-23 21:03:52] Start recording, stream saved to "twitch_39349714791_二回目の配信!バロ練!_20220523_210356.ts".
[2022-05-23 21:03:52] Use command "tail -f twitch_39349714791_二回目の配信!バロ練!_20220523_210356.ts.log" to track recording progress.
Traceback (most recent call last):
File "/usr/local/bin/streamlink", line 7, in
检查你的streamlink,有问题
------------------ 原始邮件 ------------------ 发件人: "GiGaFotress/Vtuber-recorder" @.>; 发送时间: 2022年5月23日(星期一) 晚上9:06 @.>; @.@.>; 主题: Re: [GiGaFotress/Vtuber-recorder] twitch监测脚本無反應 (Issue #8)
还是有问题不能录
[2022-05-23 21:03:52] Start recording, stream saved to "twitch_39349714791_二回目の配信!バロ練!_20220523_210356.ts". [2022-05-23 21:03:52] Use command "tail -f twitch_39349714791_二回目の配信!バロ練!_20220523_210356.ts.log" to track recording progress. Traceback (most recent call last): File "/usr/local/bin/streamlink", line 7, in from streamlink_cli.main import main File "/usr/local/lib/python3.6/site-packages/streamlink_cli/main.py", line 21, in import streamlink.logger as logger File "/usr/local/lib/python3.6/site-packages/streamlink/init.py", line 19, in from streamlink.api import streams File "/usr/local/lib/python3.6/site-packages/streamlink/api.py", line 1, in from streamlink.session import Streamlink File "/usr/local/lib/python3.6/site-packages/streamlink/session.py", line 15, in from streamlink.plugin.api.http_session import HTTPSession File "/usr/local/lib/python3.6/site-packages/streamlink/plugin/api/init.py", line 1, in from streamlink.plugin.api.http_session import HTTPSession File "/usr/local/lib/python3.6/site-packages/streamlink/plugin/api/http_session.py", line 12, in from streamlink.utils.parse import parse_json, parse_xml File "/usr/local/lib/python3.6/site-packages/streamlink/utils/init.py", line 1, in from streamlink.utils.cache import LRUCache File "/usr/local/lib/python3.6/site-packages/streamlink/utils/cache.py", line 2, in from typing import Generic, Optional, OrderedDict as TOrderedDict, TypeVar ImportError: cannot import name 'OrderedDict' [2022-05-23 21:03:56] Live stream recording stopped.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
可能是一鍵安裝腳本的Python 3.6 要改成Python 3.7 https://github.com/streamlink/streamlink/issues/4277