Giter Site home page Giter Site logo

note163checkin's Introduction

Note163Checkin

一、Fork 仓库

点击右上角的Fork fork

二、添加 Secret

Settings->Secrets->New secret,添加以下Secret:

  • Conf:其值如下:
    {
    	"Users": [{
    			"Task": "CC", //自定义名字,选填
    			"Username": "[email protected]", //账号
    			"Password": "aaa" //密码
    		}, {
    			"Task": "MM",
    			"Username": "[email protected]",
    			"Password": "111"
    		}
    	],
    	"ScKey": "", //server酱sckey,不填不开启
    	"ScType": "Failed", //通知类型. Always:始终通知; Failed:失败时通知; 不填/其他:不通知;
    	"RdsServer": "xxx.redislabs.com:1234", //redis地址,选填
    	"RdsPwd": "ppp" //redis密码,选填
    }
    • RdsServerRdsPwd是选填的,用于配置redis,来存储cookie。后续可以重用这个cookie,避免频繁登录账号。建议配置一下,可以使用redislabs的免费套餐。
    • JsUrlLoginStr这2个字段是用来登录账号的,已经设置好了默认值,不建议修改,所以上面的配置中没有列出来。详细请查看源码。

步骤图示如下: 添加secret

三、运行

Actions->Run->Run workflowrun-workflow

注意:本项目不会自动运行,需要自行在.github/workflows/main.yml添加定时任务。

四、查看运行结果

Actions->Run->build,能看到下图,表示运行成功 查看action运行记录

注意事项

24小时内频繁登录可能会触发验证,程序就会登录失败。此时需要在网页上手动登录一次(需要输入验证码),登录成功后再次运行本程序即可。

参考

参考了以下项目:

note163checkin's People

Contributors

bluehtml avatar

Stargazers

 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

note163checkin's Issues

Login时出现异常

Login时出现异常!Evaluation failed: TypeError: Cannot read properties of null (reading 'querySelector')
at main (puppeteer_evaluation_script:8:44)
at puppeteer_evaluation_script:16:1. at PuppeteerSharp.ExecutionContext.ExecuteEvaluationAsync(String method, Object args) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\ExecutionContext.cs:line 179
at PuppeteerSharp.ExecutionContext.RemoteObjectTaskToObject[T](Task`1 remote) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\ExecutionContext.cs:line 146
at PuppeteerSharp.DOMWorld.EvaluateExpressionAsync[T](String script)
at Program.<>c__DisplayClass0_0.<<

$>g__Login|2>d.MoveNext() in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 169

Error: The process '/usr/bin/xvfb-run' failed with exit code 134

我按着步骤操作,运行时报错了,代码如下
Run coactions/setup-xvfb@main /usr/bin/sudo apt-get install -y xvfb x11-xserver-utils Reading package lists... Building dependency tree... Reading state information... xvfb is already the newest version (2:21.1.4-2ubuntu1.7~22.04.1). Suggested packages: nickle cairo-5c xorg-docs-core The following NEW packages will be installed: x11-xserver-utils 0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded. Need to get 170 kB of archives. After this operation, 581 kB of additional disk space will be used. Get:1 http://azure.archive.ubuntu.com/ubuntu jammy/main amd[6](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:7)4 x11-xserver-utils amd64 [7](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:8).7+9build1 [170 kB] Fetched 170 kB in 0s (2330 kB/s) Selecting previously unselected package x11-xserver-utils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... [8](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:9)0% (Reading database ... 85% (Reading database ... [9](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:10)0% (Reading database ... 95% (Reading database ... [10](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:11)0% (Reading database ... 222125 files and directories currently installed.) Preparing to unpack .../x[11](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:12)-xserver-utils_7.7+9build1_amd64.deb ... Unpacking x11-xserver-utils (7.7+9build1) ... Setting up x11-xserver-utils (7.7+9build1) ... Processing triggers for man-db (2.10.2-1) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.15.0-1036-azure NEEDRESTART-KEXP: 5.15.0-1036-azure NEEDRESTART-KSTA: 1 Command: dotnet run /usr/bin/xvfb-run --auto-servernum dotnet run Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'json') at System.Text.Json.ThrowHelper.ThrowArgumentNullException(String parameterName) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at Program.<<Main>$>g__Deserialize|0_5[T](String json) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 188 at Program.<Main>$(String[] args) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 8 at Program.<Main>(String[] args) /usr/bin/bash /home/runner/work/_actions/coactions/setup-xvfb/main/dist/cleanup.sh /usr/bin/bash: /home/runner/work/_actions/coactions/setup-xvfb/main/dist/cleanup.sh: No such file or directory Error: The process '/usr/bin/xvfb-run' failed with exit code [134](https://github.com/BigBigBIgMan/Note163Checkin/actions/runs/4815744428/jobs/8574706266#step:3:14)

检查下添加的Secret的文件名称是否正确

          检查下添加的Secret的文件名称是否正确

Originally posted by @BigBigBIgMan in #8 (comment)

检查了配置名是Conf,登陆没问题,redis也更新了。但是还是会报以下错误。能烦请您解决一下吗,谢谢
Unhandled exception. PuppeteerSharp.NavigationException: Timeout of 60000 ms exceeded
---> System.TimeoutException: Timeout of 60000 ms exceeded
at PuppeteerSharp.Helpers.TaskHelper.<>c__DisplayClass2_0.b__0() in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Helpers\TaskHelper.cs:line 48
at PuppeteerSharp.Helpers.TaskHelper.WithTimeout(Task task, Func`1 timeoutAction, TimeSpan timeout, CancellationToken cancellationToken) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Helpers\TaskHelper.cs:line 93
at PuppeteerSharp.FrameManager.NavigateFrameAsync(Frame frame, String url, NavigationOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\FrameManager.cs:line 79
--- End of inner exception stack trace ---
at PuppeteerSharp.FrameManager.NavigateFrameAsync(Frame frame, String url, NavigationOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\FrameManager.cs:line 89
at Program.<>c__DisplayClass0_0.<<

$>g__GetCookie|1>d.MoveNext() in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 117
--- End of stack trace from previous location ---
at Program.$(String[] args) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 46
at Program.(String[] args)
/usr/bin/bash /home/runner/work/_actions/coactions/setup-xvfb/main/dist/cleanup.sh
/usr/bin/bash: /home/runner/work/_actions/coactions/setup-xvfb/main/dist/cleanup.sh: No such file or directory
Error: The process '/usr/bin/xvfb-run' failed with exit code 134

报错了

Unhandled exception. System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.

报错了,能烦请处理一下不

Unhandled exception. System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Program.<

$>g__IsInvalid|0_0(String cookie) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 103
at Program.$(String[] args) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 41
at Program.(String[] args)
/usr/bin/bash /home/runner/work/_actions/GabrielBB/xvfb-action/v1/cleanup.sh
No xvfb processes to kill
Error: The process '/usr/bin/xvfb-run' failed with exit code 134

报错了,能烦请处理一下吗

Unhandled exception. System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
---> System.TimeoutException: A task was canceled.
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Program.<

$>g__IsInvalid|0_0(String cookie) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 103
at Program.$(String[] args) in /home/runner/work/Note163Checkin/Note163Checkin/Program.cs:line 41
at Program.(String[] args)

脚本好像失效了

总是提示”登录失败,请检查账号密码是否正确!或者在网页上登录后再次运行本程序!”。
好像脚本失效了,报上面的错,能烦请再更新一下脚本吗,谢谢了!

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.