From 46cb42f4bf5414dcfb6916ce827673ed73bef510 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Thu, 19 Dec 2019 20:10:46 +1300 Subject: [PATCH] takeabyte: amend login also add config sort options --- src/Jackett.Common/Definitions/takeabyte.yml | 60 ++++++++++++++------ 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/src/Jackett.Common/Definitions/takeabyte.yml b/src/Jackett.Common/Definitions/takeabyte.yml index 1f0e4cd45..d17df0905 100644 --- a/src/Jackett.Common/Definitions/takeabyte.yml +++ b/src/Jackett.Common/Definitions/takeabyte.yml @@ -9,7 +9,6 @@ - https://takeabyte-nordic.org/ certificates: - 8b88d216d270b9b672ba44fbbdd5ca3d8919e5fd # expired Nov 2015 - caps: categorymappings: @@ -60,36 +59,63 @@ tv-search: [q, season, ep] movie-search: [q] + settings: + - name: username + type: text + label: Username + - name: password + type: password + label: Password + - name: sort + type: select + label: Sort requested from site + default: "4" + options: + "4": "created" + "7": "seeders" + "5": "size" + "1": "title" + - name: type + type: select + label: Order requested from site + default: "desc" + options: + "desc": "desc" + "asc": "asc" + login: - path: login.php - method: form - form: form[action="takelogin.php"] + path: takelogin.php + method: post inputs: username: "{{ .Config.username }}" password: "{{ .Config.password }}" - returnto: "/browse.php" + returnto: "/" error: - selector: h2:contains("Login failed!") message: selector: table tr td.colhead2 test: path: / - selector: :has(a[href^="logout.php?hash_please="]) + selector: a[href^="logout.php?hash_please="] search: paths: # http://takeabyte-nordic.org/browse.php?search=first+man&searchin=title&incldead=0 - # http://takeabyte-nordic.org/browse.php?c9=1&c47=1&c21=1&c11=1&c25=1&c14=1&c26=1&c3=1&search=%22first+man%22&searchin=title&incldead=0 + # http://takeabyte-nordic.org/browse.php?c9=1&c26=1&c3=1&search=%22first+man%22&searchin=title&incldead=0 - path: browse.php inputs: - $raw: "{{range .Categories}}c{{.}}=1&{{end}}" - search: "{{.Keywords}}" - searchin: "title" + $raw: "{{ range .Categories }}c{{.}}=1&{{end}}" + search: "{{ .Keywords }}" + searchin: title incldead: 1 + sort: "{{ .Config.sort }}" + type: "{{ .Config.type }}" + rows: selector: table tr:has(a[href^="browse.php?cat="]):has(a[href^="details.php?id="]) filters: - name: andmatch + fields: title: selector: a[href^="details.php?id="] b @@ -115,10 +141,8 @@ grabs: selector: td:nth-last-child(3) filters: - - name: replace - args: ["times", ""] - - name: replace - args: ["time", ""] + - name: regexp + args: (\d+) # 2 flavours of dates date: # Today
13:20:59 @@ -140,9 +164,9 @@ selector: td:nth-last-child(1) downloadvolumefactor: case: - "b:contains(\"[Free and Double]\")": "0" - "*": "1" + "b:contains(\"[Free and Double]\")": 0 + "*": 1 uploadvolumefactor: case: - "b:contains(\"[Free and Double]\")": "2" - "*": "1" \ No newline at end of file + "b:contains(\"[Free and Double]\")": 2 + "*": 1 \ No newline at end of file