From 655448fb7416cdf6889f6bd4531f3662b3eab02d Mon Sep 17 00:00:00 2001 From: Romain Lecat Date: Thu, 24 Jan 2019 10:15:18 +0100 Subject: [PATCH] Fix for YggTorrent shitty URL management. Thanks to @xfouloux for this. Fixes #4504 (#4521) * Fix for YggTorrent shitty URL management. Thanks to @xfouloux for this. Fixes #4504 * Add option to perform agressive quality mapping, required for some fr anime releases * Correct search URL for yggtorrent by default * Revert "Add option to perform agressive quality mapping, required for some fr anime releases" This reverts commit b74042362c65c0412db714d46f9d95dcb2f44ff1. --- src/Jackett.Common/Definitions/yggtorrent.yml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Jackett.Common/Definitions/yggtorrent.yml b/src/Jackett.Common/Definitions/yggtorrent.yml index 95f90859a..b37501b9a 100644 --- a/src/Jackett.Common/Definitions/yggtorrent.yml +++ b/src/Jackett.Common/Definitions/yggtorrent.yml @@ -1,4 +1,4 @@ ---- +--- site: yggtorrent name: YGGtorrent description: "YGGTorrent is a FRENCH Semi-Private Torrent Tracker for 0DAY / GENERAL" @@ -7,7 +7,7 @@ encoding: UTF-8 followredirect: true links: - - https://www2.yggtorrent.gg/ + - https://yggtorrent.gg/ legacylinks: - https://yggtorrent.com/ - https://ww1.yggtorrent.com/ @@ -25,7 +25,6 @@ - https://ygg.to/ - https://www.ygg.to/ - https://ww3.yggtorrent.gg/ - - https://www.yggtorrent.gg/ caps: categorymappings: @@ -88,6 +87,10 @@ movie-search: [q] settings: + - name: searchanddlurl + label: Search and download URL + type: text + default: www2.yggtorrent.gg - name: username type: text label: Username @@ -147,12 +150,13 @@ - selector: "#login_msg_pass[style=\"\"][style] > center" test: path: / - selector: a[href$="/user/logout"] + selector: div#top_panel:contains("Déconnexion") search: + followredirect: true paths: - - path: "/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date" - - path: "/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50" + - path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date" + - path: "https://{{ .Config.searchanddlurl }}/engine/search?category={{ .Config.category }}&name={{if .Config.enhancedAnime}}{{ re_replace .Keywords \"([\\.\\s\\[\\-])(\\d+)$\" \"$1e$2\" }}{{else}}{{ .Keywords }}{{end}}&description=&file=&uploader=&sub_category=&do=search&order=desc&sort=publish_date&page=50" rows: selector: "table.table > tbody > tr" @@ -249,7 +253,7 @@ selector: "td:nth-child(1) > a[href$=\"#comments\"]" attribute: href download: - text: "/engine/download_torrent?id={{ .Result._id }}" + text: "https://{{ .Config.searchanddlurl }}/engine/download_torrent?id={{ .Result._id }}" date: selector: "td:nth-child(5)" filters: @@ -290,7 +294,7 @@ leechers: text: 0 leechers: - selector: "td:nth-child(*)" + selector: "td:nth-child(9)" optional: true downloadvolumefactor: text: "1"