From 5b4596b54be720a2ac84b6bf79d1fa7bb406185b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 24 Jan 2023 23:12:13 +0200 Subject: [PATCH] hdtime: add 2fa support and update login inputs (#13928) --- src/Jackett.Common/Definitions/hdtime.yml | 40 +++++++++++++++-------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/Jackett.Common/Definitions/hdtime.yml b/src/Jackett.Common/Definitions/hdtime.yml index c8696eb45..366c1a978 100644 --- a/src/Jackett.Common/Definitions/hdtime.yml +++ b/src/Jackett.Common/Definitions/hdtime.yml @@ -38,6 +38,13 @@ settings: - 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 2FA code box if you have enabled 2FA on the HDtime Web Site. Otherwise just leave it empty." - name: freeleech type: checkbox label: Search freeleech only @@ -67,11 +74,14 @@ login: path: takelogin.php method: post inputs: - loginmethod: username + secret: "" username: "{{ .Config.username }}" password: "{{ .Config.password }}" - dutime: month + two_step_code: "{{ .Config.2facode }}" + logout: "" + securelogin: "" ssl: yes + trackerssl: yes error: - selector: td.embedded:has(h2:contains("失败")) - selector: td.embedded:has(h2:contains("Failed")) @@ -84,12 +94,12 @@ search: - path: torrents.php inputs: $raw: "{{ range .Categories }}cat{{.}}=1&{{end}}" - search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ end }}{{ if .Query.DoubanID }}/{{ .Query.DoubanID }}{{ else }}{{ end }}{{ if or .Query.IMDBID .Query.DoubanID }}{{ else }}{{ .Keywords }}{{ end }}" + search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ end }}{{ if or .Query.IMDBID .Query.DoubanID }} {{ else }}{{ .Keywords }}{{ end }}{{ if .Query.DoubanID }}{{ .Query.DoubanID }}{{ else }}{{ end }}" # 0 incldead, 1 active, 2 dead incldead: 0 # 0 all, 1 normal, 2 free, 3 2x, 4 2xfree, 5 50%, 6 2x50%, 7 30% spstate: "{{ if .Config.freeleech }}2{{ else }}0{{ end }}" - # 0 title, 1 descr, 3 uploader, 4 imdburl (4 does not appear to work). + # 0 title, 1 descr, 3 uploader, 4 imdburl (not working) search_area: "{{ if or .Query.IMDBID .Query.DoubanID }}1{{ else }}0{{ end }}" # 0 AND, 1 OR, 2 exact search_mode: 0 @@ -124,9 +134,13 @@ search: # site currently only has a badge and rating, the id is not present. just in case a future update. selector: a[href*="imdb.com/title/tt"] attribute: href + doubanid: + # site currently only has a badge and rating, the id is not present. just in case a future update. + selector: a[href*="movie.douban.com/subject/"] + attribute: href date_elapsed: # time type: time elapsed (default) - selector: td:nth-child(4) > span[title] + selector: td.rowfollow:nth-child(4) > span[title] attribute: title optional: true filters: @@ -136,7 +150,7 @@ search: args: "2006-01-02 15:04:05 -07:00" date_added: # time added - selector: td:nth-child(4):not(:has(span)) + selector: td.rowfollow:nth-child(4):not(:has(span)) optional: true filters: - name: append @@ -146,13 +160,13 @@ search: date: text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}" size: - selector: td:nth-child(5) + selector: td.rowfollow:nth-child(5) seeders: - selector: td:nth-child(6) + selector: td.rowfollow:nth-child(6) leechers: - selector: td:nth-child(7) + selector: td.rowfollow:nth-child(7) grabs: - selector: td:nth-child(8) + selector: td.rowfollow:nth-child(8) downloadvolumefactor: case: img.pro_free: 0 @@ -168,8 +182,8 @@ search: img.pro_2up: 2 "*": 1 minimumratio: - text: 0.8 + text: 0.81 description: - selector: td:nth-child(2) + selector: td.rowfollow:nth-child(2) remove: a, img -# NexusPHP v1.7.4 +# NexusPHP v1.7.33 2023-01-04