DokiDoki1103 / tikuAdapter

大学生网课题库接口适配器:将不同的题库整合为一个API接口。
MIT License
230 stars 22 forks source link

关于wanneng题库接口有更新,求大佬更新一下 #42

Closed 19819068211 closed 1 month ago

19819068211 commented 1 month ago

以前向wanneng题库api `[https://lyck6.cn/scriptService/api/autoFreeAnswer传入题目例如{](https://lyck6.cn/scriptService/api/autoFreeAnswer%E4%BC%A0%E5%85%A5%E9%A2%98%E7%9B%AE%E4%BE%8B%E5%A6%82%7B) "question": "电影蒙太奇时期的代表作"} ,返回答案第一个[ "《仙女国》、《火车大劫案》、《罢工》"],就是正确答案,现在返回好几个不相关的答案不一定第几个是正确答案,返回例如 { "timestamp": 1726760062548, "code": 0, "message": "请求成功", "result": { "group": "860951928", "num": -1, "answers": [ [ "电影眼睛派" ], [ "正确" ], [ "电影语言" ], [ "剪辑与影片节奏、时空以及主题思想之间的关系" ], [ "《仙女国》、《火车大劫案》、《罢工》" ], [ "《战肌波将金号》", "《持摄影机的人》" ], [ "《战舰波将金号》" ], [ "唐璜" ], [ "对" ], [ "(1)库里肖夫:《党同伐异》;(2)维尔托夫:《电影真理报》;(3)普多夫金:《大脑的功能》。" ] ], "success": false } } 现在 返回答案为选项序号比如ABC就是0,1,2 返回体如下

`{
"timestamp": 1726759889144,
"code": 0,
"message": "请求成功",
"result": {
"group": "860951928",
"num": -1,
"answers": [
0,
1,
2,
3
],
"success": true
}
}`

求教如何修改使得题库可用 这就导致使用tikuAdapter指定wanneng题库api返回answer为空,求更新使用方法

{
    "plat": 0,
    "question": "违反安全保障义务责任属于()",
    "options": [
        "公平责任",
        "特殊侵权责任",
        "过错推定责任",
        "连带责任"
    ],
    "type": 1,
    "answer": {
        "answerKey": [],
        "answerKeyText": "",
        "answerIndex": [],
        "answerText": "",
        "bestAnswer": [],
        "allAnswer": [
            [
                "被监护人致人损害责任"
            ],
            [
                "公平责任原则"
            ],
            [
                "被监护人致人损害责任"
            ],
            [
                "过错责任原则"
            ],
            [
                "公平责任原则"
            ],
            [
                "过错责任原则"
            ],
            [
                "过错责任原则"
            ],
            [
                "自己责任和他人责任"
            ],
            [
                "自己责任和他人责任"
            ],
            [
                "错误"
            ]
        ]
    }
}