xjasonlyu / 98tang_daysign

98tang Daysign Script
MIT License
57 stars 34 forks source link

请教下这个报错该怎么解决SyntaxError: unterminated string literal #16

Open tyhunter opened 1 year ago

tyhunter commented 1 year ago

Traceback (most recent call last): File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 199, in main() File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 169, in main cookies = retrieve_cookies_from_fetch('FETCH_98TANG') File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 137, in retrieve_cookies_from_fetch cookie_str = parse_fetch(os.getenv(env))['headers']['cookie'] File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 132, in parse_fetch exec(s, { File "", line 7 "sec-ch-ua": "\Not/A)Brand\;v=\99\, \Google Chrome\;v=\115\, \Chromium\;v=\115\", ^ SyntaxError: unterminated string literal (detected at line 7)

复制出来的fech格式如下,变量名称FETCH_98TANG fetch("https://www.sehuatang.net/plugin.php?id=dd_sign:index", { "headers": { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7", "accept-language": "en,zh-CN;q=0.9,zh;q=0.8", "cache-control": "no-cache", "pragma": "no-cache", "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"macOS\"", "sec-fetch-dest": "document", "sec-fetch-mode": "navigate", "sec-fetch-site": "same-origin", "sec-fetch-user": "?1", "upgrade-insecure-requests": "1", "cookie": "**", "Referer": "https://www.sehuatang.net/forum.php?mod=viewthread&tid=1499862&extra=page%3D1", "Referrer-Policy": "strict-origin-when-cross-origin" }, "body": null, "method": "GET" });

EdisonCh4n commented 1 year ago

同样的报错,求大佬指导下