From 5a7e0158d6a3fa858861bd372dda0005577e2be6 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Wed, 11 Dec 2019 17:09:10 +1300 Subject: [PATCH] tokyotosho: amend selectors. resolves #6580 also add magnets and DL/UL volume factors. --- src/Jackett.Common/Definitions/tokyotosho.yml | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/Jackett.Common/Definitions/tokyotosho.yml b/src/Jackett.Common/Definitions/tokyotosho.yml index c69381a9a..208f63946 100644 --- a/src/Jackett.Common/Definitions/tokyotosho.yml +++ b/src/Jackett.Common/Definitions/tokyotosho.yml @@ -29,44 +29,50 @@ 11: TV/Anime # Batch 15: XXX # JAV 5: Other # Other + modes: search: [q] tv-search: [q, season, ep] search: paths: - - path: "{{if .Query.Keywords }}search.php{{else}}index.php{{end}}" + - path: "{{if .Keywords }}search.php{{else}}index.php{{end}}" inputs: - terms: "{{ .Query.Keywords }}" + terms: "{{ .Keywords }}" type: "{{ .Config.type-id }}" cat: "{{ .Config.type-id }}" + rows: selector: "table.listing tr.category_0" after: 1 fields: category: - selector: td:nth-child(1) > a + selector: a[href*="?cat="] attribute: href filters: - name: regexp - args: "(\\d+)" + args: (\d+) title: - selector: td:nth-child(2) > a:nth-child(2) + selector: td.desc-top a[type="application/x-bittorrent"] details: - selector: td:nth-child(3) > a + selector: a[href^="details.php?id="] attribute: href download: - selector: td:nth-child(2) > a:nth-child(2) + selector: td.desc-top a[type="application/x-bittorrent"] attribute: href + magnet: + selector: a[href^="magnet:?xt="] + attribute: href + optional: true size: - selector: td:nth-child(4) + selector: td.desc-bot filters: - name: split args: [ "|", 1 ] - name: regexp args: "Size: (.+?) ?$" date: - selector: td:nth-child(4) + selector: td.desc-bot filters: - name: split args: [ "|", 2 ] @@ -77,6 +83,10 @@ - name: dateparse args: "2006-01-02 15:04 -07" seeders: - selector: td:nth-child(5) > span:nth-child(1) + selector: td.stats > span:nth-child(1) leechers: - selector: td:nth-child(5) > span:nth-child(2) + selector: td.stats > span:nth-child(2) + downloadvolumefactor: + text: 0 + uploadvolumefactor: + text: 1