rain: switch to cookie method. resolves #15842

This commit is contained in:
Garfield69
2025-07-08 05:59:35 +12:00
parent d8d26edb98
commit 7b5055c17b

View File

@@ -28,19 +28,11 @@ caps:
music-search: [q]
settings:
- name: username
- name: cookie
type: text
label: Username
- name: password
type: password
label: Password
- name: 2facode
type: text
label: 2FA code
- name: info_2fa
type: info
label: "About 2FA code"
default: "Only fill in the <b>2FA code</b> box if you have enabled <b>2FA</b> on the Rain Web Site. Otherwise just leave it empty."
label: Cookie
- name: info_cookie
type: info_cookie
- name: freeleech
type: checkbox
label: Search freeleech only
@@ -71,24 +63,10 @@ settings:
default: "Account retention rules:<ol><li>Veteran User and above will be retained forever</li><li>Elite User and above will not have their account deleted after parking (in the control panel)</li><li> Users with a parked account will be deleted if they do not log in for 4000 consecutive days</li><li>Users with a non-parked account will be deleted if they do not log in for 3650 consecutive days</li></ol>"
login:
path: login.php
method: form
form: form[action="takelogin.php"]
captcha:
type: image
selector: img[alt="CAPTCHA"]
input: imagestring
# using cookie method because site regularly disables login page for certain events during the year
method: cookie
inputs:
secret: ""
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
two_step_code: "{{ .Config.2facode }}"
logout: ""
securelogin: ""
ssl: yes
trackerssl: yes
error:
- selector: td.embedded:has(h2:contains("失败"))
cookie: "{{ .Config.cookie }}"
test:
path: index.php
selector: a[href="logout.php"]