Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 希望添加“将’变量提取‘功能提取出的变量覆盖预定义变量“的api #503

Open
4 tasks done
Nigel-NI opened this issue Feb 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Nigel-NI
Copy link

Verify steps

  • Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • Need 当前 QD 框架并不包含该功能特性或者还不完善
  • Framework 这是 QD 框架应包含的特性,并非模板特性
  • Meaningful 我提交的不是无意义的 催促更新或修复 请求

Describe the Feature

举个例子,需要门禁卡才能进入小区,门禁卡每周需要换一张新的,不过每次进入小区时,刷开小区门后门卫会问你“要不要现在就换一张新卡”,哪怕你的门禁卡还没有过期;如果你的门禁卡过期了,不仅打不开小区门,同时和门卫申请换新卡的请求也会被拒绝。大多数人都会选择要一张新卡,但是qd框架似乎只会坚持使用旧卡,除非手动丢掉旧卡,给他换一张新的。但是手动换卡的问题在于,每周都要自行去换。

部分网站的cookie有效期并非永久,但是这些网站只要定期打开即可保持长期登录。通过比对,发现这些网站会推送新的cookies覆盖旧的cookies,以实现登录持久化的目的。
通过变量提取功能可以将网站推送的新cookie提取出来,但是提取出的新cookie只能用于当次签到活动中,下次再签到时仍然使用预定义变量中设置的旧cookie。倘若预定义变量中的cookie失效,模拟登录时网站并不会推送新cookie,而是直接提示“登录失败”。这就导致cookie需要定期手动更新,十分麻烦。

Describe the solution

定义一个新的api或类似方式,将“变量提取”获得的新变量覆盖新建任务时手动输入的变量,以实现长期自动化签到的目的,降低维护成本。

Describe alternatives

通过“用户名+密码”方式可模拟登录并获得最新的cookie。但是部分网站的验证码较为复杂,现有的ocr模块无法正确识别并填充,不得不使用cookie登录的方式。
比如这张图中的验证码,OCR识别出的内容为“7896a“,加减乘除相关运算暂且不谈,光是识别结果就非常奇怪:
image

Additional context

No response

@Nigel-NI Nigel-NI added the enhancement New feature or request label Feb 16, 2024
@a76yyyy
Copy link
Contributor

a76yyyy commented Feb 16, 2024

duplicate #399

TODO

@loveqianool
Copy link

记事本好像就是干这个的,或者 金山文档 和 Cloudflare KV 都可以存取数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants