52pt, ptsbao: use cookie method (#9554)

This commit is contained in:
Jian Li 2020-09-19 02:17:20 +08:00 committed by GitHub
parent e49b75aa79
commit 2d367a81fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 48 deletions

View File

@ -28,16 +28,21 @@ caps:
music-search: [q]
settings:
- name: username
- name: cookie
type: text
label: Username
- name: password
type: password
label: Password
label: Cookie
- name: info
type: info
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: freeleech
type: checkbox
label: Search freeleech only
default: false
- name: info_tpp
type: info
label: Results Per Page
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
- name: sort
type: select
label: Sort requested from site
@ -60,25 +65,20 @@ settings:
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
login:
path: login.php
method: form
form: form[action="takelogin.php"]
captcha:
type: image
selector: img[alt="CAPTCHA"]
input: imagestring
method: cookie
inputs:
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
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"]
ratio:
path: index.php
selector: table tr td.bottom
filters:
- name: replace
args: ["分享率:", "Ratio:"] # for simplified chinese language setting
- name: regexp
args: "Ratio:\\s(.*?)\\s\\s"
search:
paths:

View File

@ -28,20 +28,21 @@ caps:
music-search: [q]
settings:
- name: info_email
type: info
label: "About the Username field"
default: "Enter your <b>Email address</b> in the username field."
- name: username
- name: cookie
type: text
label: Username
- name: password
type: password
label: Password
label: Cookie
- name: info
type: info
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: freeleech
type: checkbox
label: Search freeleech only
default: false
- name: info_tpp
type: info
label: Results Per Page
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
- name: sort
type: select
label: Sort requested from site
@ -64,27 +65,20 @@ settings:
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
login:
path: login.php
method: form
form: form[action="takelogin.php"]
captcha:
type: image
selector: img[alt="CAPTCHA"]
input: imagestring
method: cookie
inputs:
loginmethod: email
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
dutime: month
logout: ""
securelogin: ""
ssl: yes
trackerssl: ""
error:
- selector: td.embeddeds:has(h2:contains("失败"))
cookie: "{{ .Config.cookie }}"
test:
path: index.php
selector: a[href="logout.php"]
ratio:
path: index.php
selector: table tr td.bottom
filters:
- name: replace
args: ["分享率:", "Ratio:"] # for simplified chinese language setting
- name: regexp
args: "Ratio:\\s(.*?)\\s\\s"
search:
paths: