Code Monkey home page Code Monkey logo

98tang_daysign's Introduction

98tang Daysign Script

Notice: Actions is unable to sign 98tang since its IP was filtered by Cloudflare. Try to run locally.

How to use in Qinglong (Recommended)

  1. Export cookies from Browser (Copy as Node.js fetch)
  2. Add FETCH_98TANG env variable in Qinglong
  3. Add ql repo https://github.com/xjasonlyu/98tang_daysign as scheduled task and run it manually
  4. The daysign task would be added automatically

How to use in Actions

  1. Export cookies from Browser
  2. Clone this repository
  3. Add secrets in repo settings

How to retrieve cURL/fetch command

  1. Go to https://www.sehuatang.net/plugin.php?id=dd_sign&view=daysign
  2. Press F12 to open the developer console
  3. Locate the Network tab
  4. Right click the relevant request, and select Copy as cURL or Copy as Node.js fetch

Environment variables

  1. CURL_98TANG: cURL command string (e.g. curl -H 'xxx:xxx')
  2. FETCH_98TANG: Node.js fetch string (e.g. fetch("xxx", ...))
  3. TG_USER_ID(optional): @BotFather bot chat ID
  4. TG_BOT_TOKEN(optional): @BotFather bot token

Telegram notification

create a telegram bot

98tang_daysign's People

Contributors

xjasonlyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

98tang_daysign's Issues

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

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"
});

Qinglong失败

开始执行... 2022-04-15 12:05:31

/ql/config/env.sh: line 18: syntax error near unexpected token (' /ql/config/env.sh: line 18: -H'user-agent:Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/100.0.4896.75Safari/537.36''
/ql/config/env.sh: line 18: syntax error near unexpected token (' /ql/config/env.sh: line 18: -H'user-agent:Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/100.0.4896.75Safari/537.36''
98堂 签到异常

错误原因:'NoneType' object is not subscriptable

None

执行结束... 2022-04-15 12:05:32 耗时 1 秒

报错显示local variable 'raw_html' referenced before assignment

Traceback (most recent call last):
File "/home/runner/work/98tang_daysign/98tang_daysign/daysign.py", line 114, in
main()
File "/home/runner/work/98tang_daysign/98tang_daysign/daysign.py", line 100, in main
message_text = f'98堂 签到异常\n\n错误原因:{e}\n--------------------\n{raw_html}'
UnboundLocalError: local variable 'raw_html' referenced before assignment
Error: Process completed with exit code 1

请问大佬可能是什么问题呢

青龙任务问题

请教一下,task 任务的时候 出来这个是什么问题啊?


xjasonlyu_98tang_daysign.com/xjasonlyu/98tang_daysign

开始执行... 2023-01-26 09:36:24

/ql/shell/otask.sh: line 236: cd: raw_xjasonlyu_98tang_daysign.com/xjasonlyu: No such file or directory
timeout: failed to run command ‘98tang_daysign’: No such file or directory

执行结束... 2023-01-26 09:36:25 耗时 1 秒


大佬,请教一下,报这个错误是怎么回事啊?

大佬,请教一下,报这个错误是怎么回事啊?

开始执行... 2024-01-19 22:10:35

comment to: tid = 1808288, message = 不错。。。
Traceback (most recent call last):
File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 180, in main
raw_html = daysign(cookies=cookies)
File "/ql/data/scripts/xjasonlyu_98tang_daysign/daysign.py", line 102, in daysign
soup = BeautifulSoup(r.text, 'xml')
File "/usr/local/lib/python3.10/site-packages/bs4/init.py", line 250, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
错误原因:Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?
tg 服务的 bot_token 或者 user_id 未设置!!
取消推送

执行结束... 2024-01-19 22:10:40 耗时 5 秒   

GitHub Actions Secrets

请问这里怎么设置啊?
CURL: cURL command string (e.g. curl -H 'xxx:xxx')
这一步 可否来个图文?设置半天一直出错
image
也不知道添加的地方对不对···
image

一直提示COOKIE报错怎么办

请问是我的获取方式不对吗?还是格式问题?
cPNj_123_saltkey=123;
cPNj_123_auth=321;
大概这样排列了几行是正确的吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.