14790897 / auto-read-liunxdo Goto Github PK
View Code? Open in Web Editor NEWAuto-scrubbing of articles and auto-likes in discourse
License: MIT License
Auto-scrubbing of articles and auto-likes in discourse
License: MIT License
Win11 22621;Webstorm 2024.1;Node.js v21.6.2.
问题:const usernames = process.env.USERNAMES.split(", ");
^
TypeError: Cannot read properties of undefined (reading 'split')
at Object. (F:\hsy\code\auto-read-liunxdo\pteer.js:7:41)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49
Node.js v21.6.2
进程已结束,退出代码为 1
.env为原始状态
liunxdo | /app/node_modules/puppeteer-core/lib/cjs/puppeteer/util/disposable.js:9
liunxdo | Symbol.dispose ??= Symbol('dispose');
liunxdo | ^^^
liunxdo |
liunxdo | SyntaxError: Unexpected token '??='
liunxdo | at wrapSafe (internal/modules/cjs/loader.js:1029:16)
liunxdo | at Module._compile (internal/modules/cjs/loader.js:1078:27)
liunxdo | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
liunxdo | at Module.load (internal/modules/cjs/loader.js:979:32)
liunxdo | at Function.Module._load (internal/modules/cjs/loader.js:819:12)
liunxdo | at Module.require (internal/modules/cjs/loader.js:1003:19)
liunxdo | at require (internal/modules/cjs/helpers.js:107:18)
liunxdo | at Object.<anonymous> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js:13:25)
liunxdo | at Module._compile (internal/modules/cjs/loader.js:1114:14)
liunxdo | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
liunxdo exited with code 1
请教下,如果使用非github action的workflow模式下,如何指定阅读时间?用docker的方式,可以指定阅读时长么?还是说docker方式就是一直阅读,直到出现429错误自己退出?现在是在操作系统里的cron配置了定时做docker-compose down
root@ubuntu:~/auto_linuxdo# npm install
[email protected] postinstall /root/auto_linuxdo/node_modules/puppeteer
node install.mjs
/root/auto_linuxdo/node_modules/puppeteer/install.mjs:31
const {downloadBrowser} = await importInstaller();
^^^^^
SyntaxError: await is only valid in async function
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
docker部署起来以后,没有任何日志
"Failed to load resource: the server responded with a status of 429"这个提示正常吗?
下面是具体的日志:
登录操作
PAGE LOG: JSHandle@node
PAGE LOG: Login button clicked.
PAGE LOG: Autofocus processing was blocked because a document already has a focused element.
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
找到avatarImg,登录成功
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本第一次运行,执行初始化操作...
PAGE LOG: 执行了初始数据更新操作
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/6022
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: Clicked like button 1
PAGE LOG: Clicked like button 2
PAGE LOG: Clicked like button 3
PAGE LOG: Clicked like button 4
PAGE LOG: Clicked like button 5
PAGE LOG: Clicked like button 6
PAGE LOG: Clicked like button 7
PAGE LOG: Clicked like button 8
PAGE LOG: Clicked like button 9
PAGE LOG: Clicked like button 10
PAGE LOG: Clicked like button 11
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
PAGE LOG: Clicked like button 12
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
PAGE LOG: Clicked like button 13
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
PAGE LOG: Clicked like button 14
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
Retrying now...
PAGE LOG: Clicked like button 15
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
快捷登录变量的账号密码怎么写
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
PAGE LOG: No link with the specified format was found.
一直刷这个正常吗?
Code
Pull requests
Scheduled Node.js CI
Scheduled Node.js CI #2
build (20.x)
Started 2m 52s ago
Beta
Give feedback
1s
0s
3s
12s
2m 37s
Run node pteer.js
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) %o
登录操作
PAGE LOG: JSHandle@node
PAGE LOG: Login button clicked.
PAGE LOG: Autofocus processing was blocked because a document already has a focused element.
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
找到avatarImg,登录成功
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本第一次运行,执行初始化操作...
PAGE LOG: 执行了初始数据更新操作
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/48228/4
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled true
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: Clicked like button 1
PAGE LOG: Clicked like button 2
PAGE LOG: Clicked like button 3
PAGE LOG: Clicked like button 4
PAGE LOG: Clicked like button 5
PAGE LOG: Clicked like button 6
PAGE LOG: Clicked like button 7
PAGE LOG: Clicked like button 8
PAGE LOG: Clicked like button 9
PAGE LOG: Clicked like button 10
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
PAGE LOG: Failed to update topic times for topic 48228 due to 429 error
PAGE LOG: Clicked like button 11
PAGE LOG: 已滚动到底部
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
PAGE LOG: Failed to load resource: the server responded with a status of 429 ()
Page error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
Page error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
Page error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
Retrying now...
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/47799/5
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd[8](https://github.com/ericsgit2/auto-read-liunxdo/actions/runs/8571131277/job/23490690522#step:5:9)e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e[9](https://github.com/ericsgit2/auto-read-liunxdo/actions/runs/8571131277/job/23490690522#step:5:10)bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/37675/459
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/48[12](https://github.com/ericsgit2/auto-read-liunxdo/actions/runs/8571131277/job/23490690522#step:5:13)9/34
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/47930/39
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/48267/7
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/174[13](https://github.com/ericsgit2/auto-read-liunxdo/actions/runs/8571131277/job/23490690522#step:5:14)/935
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/48127
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
PAGE LOG: 已滚动到底部
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 正在导航到下一个话题
PAGE LOG: Found link: https://linux.do/t/topic/[17](https://github.com/ericsgit2/auto-read-liunxdo/actions/runs/8571131277/job/23490690522#step:5:18)413/1
Page error: Cannot read properties of null (reading 'appendChild')
PAGE LOG: ℹ️ Discourse v3.2.1 — https://github.com/discourse/discourse/commits/5abd8e9bb0 — Ember v5.5.0
PAGE LOG: 脚本非第一次运行
PAGE LOG: autoRead true autoLikeEnabled false
PAGE LOG: 执行正常的滚动和检查逻辑
Page error: Cannot read properties of null (reading 'appendChild')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.