From 2d367a81fd56c68adcf3236da688ac338b7a920d Mon Sep 17 00:00:00 2001 From: Jian Li Date: Sat, 19 Sep 2020 02:17:20 +0800 Subject: [PATCH] 52pt, ptsbao: use cookie method (#9554) --- src/Jackett.Common/Definitions/52pt.yml | 42 ++++++++++---------- src/Jackett.Common/Definitions/ptsbao.yml | 48 ++++++++++------------- 2 files changed, 42 insertions(+), 48 deletions(-) diff --git a/src/Jackett.Common/Definitions/52pt.yml b/src/Jackett.Common/Definitions/52pt.yml index 68b97f0bd..6f29f9ca9 100644 --- a/src/Jackett.Common/Definitions/52pt.yml +++ b/src/Jackett.Common/Definitions/52pt.yml @@ -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: "
  1. Login to this tracker with your browser
  2. Open the DevTools panel by pressing F12
  3. Select the Network tab
  4. Click on the Doc button (Chrome Browser) or HTML button (FireFox)
  5. Refresh the page by pressing F5
  6. Click on the first row entry
  7. Select the Headers tab on the Right panel
  8. Find 'cookie:' in the Request Headers section
  9. Select and Copy the whole cookie string (everything after 'cookie: ') and Paste here.
" - 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 Torrents per page: setting to 100 on your account profile. - name: sort type: select label: Sort requested from site @@ -60,25 +65,20 @@ settings: default: For best results, change the Torrents per page: setting to 100 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: diff --git a/src/Jackett.Common/Definitions/ptsbao.yml b/src/Jackett.Common/Definitions/ptsbao.yml index 5a7ea8715..753403ae4 100644 --- a/src/Jackett.Common/Definitions/ptsbao.yml +++ b/src/Jackett.Common/Definitions/ptsbao.yml @@ -28,20 +28,21 @@ caps: music-search: [q] settings: - - name: info_email - type: info - label: "About the Username field" - default: "Enter your Email address 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: "
  1. Login to this tracker with your browser
  2. Open the DevTools panel by pressing F12
  3. Select the Network tab
  4. Click on the Doc button (Chrome Browser) or HTML button (FireFox)
  5. Refresh the page by pressing F5
  6. Click on the first row entry
  7. Select the Headers tab on the Right panel
  8. Find 'cookie:' in the Request Headers section
  9. Select and Copy the whole cookie string (everything after 'cookie: ') and Paste here.
" - 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 Torrents per page: setting to 100 on your account profile. - name: sort type: select label: Sort requested from site @@ -64,27 +65,20 @@ settings: default: For best results, change the Torrents per page: setting to 100 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: