crazyhd: switch to cookie with UA method

This commit is contained in:
Garfield69 2022-11-03 21:56:34 +13:00
parent d7b35613b1
commit fadc46c381
1 changed files with 18 additions and 13 deletions

View File

@ -90,12 +90,20 @@ caps:
book-search: [q] book-search: [q]
settings: settings:
- name: username - name: cookie
type: text type: text
label: Username label: Cookie
- name: password - name: info
type: password type: info
label: Password label: How to get the Cookie
default: "<ol><li>Login to this tracker with your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)<li>Refresh the page by pressing <b>F5</b><li>Click on the first row entry<li>Select the <b>Headers</b> tab on the Right panel<li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section<li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</ol>"
- name: useragent
type: text
label: User-Agent
- name: info_useragent
type: info
label: How to get the User-Agent
default: "<ol><li>From the same place you fetched the cookie,<li>Find <b>'user-agent:'</b> in the <b>Request Headers</b> section<li><b>Select</b> and <b>Copy</b> the whole user-agent string <i>(everything after 'user-agent: ')</i> and <b>Paste</b> here.</ol>"
- name: freeleech - name: freeleech
type: checkbox type: checkbox
label: Search freeleech only label: Search freeleech only
@ -118,19 +126,16 @@ settings:
1: asc 1: asc
login: login:
path: index.php method: cookie
method: form
form: form[action="index.php?page=login"]
inputs: inputs:
uid: "{{ .Config.username }}" cookie: "{{ .Config.cookie }}"
pwd: "{{ .Config.password }}"
error:
- selector: td.lista span[style="color:#FF0000;"]
test: test:
path: index.php path: /
selector: a[href="logout.php"] selector: a[href="logout.php"]
search: search:
headers:
User-Agent: ["{{ .Config.useragent }}"]
paths: paths:
- path: index.php?page=searchlist - path: index.php?page=searchlist
method: post method: post