From b01a72c39350aae5bb847b01f38d37b12a0bc59d Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:40:42 +0000 Subject: [PATCH] yggtorrent: revert to post method for login (#10852) --- src/Jackett.Common/Definitions/yggcookie.yml | 16 +++++--------- src/Jackett.Common/Definitions/yggtorrent.yml | 22 ++++++------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/Jackett.Common/Definitions/yggcookie.yml b/src/Jackett.Common/Definitions/yggcookie.yml index fd998e61f..1c35f0dc7 100644 --- a/src/Jackett.Common/Definitions/yggcookie.yml +++ b/src/Jackett.Common/Definitions/yggcookie.yml @@ -7,8 +7,7 @@ type: semi-private encoding: UTF-8 followredirect: true links: - - https://www.yggtorrent.si/ - # don't forget to also change below in settings ! + - https://www2.yggtorrent.si/ legacylinks: - https://yggtorrent.com/ - https://ww1.yggtorrent.com/ @@ -34,6 +33,7 @@ legacylinks: - https://www5.yggtorrent.pe/ - https://yggtorrent.ws/ - https://yggtorrent.se/ + - https://www.yggtorrent.si/ caps: categorymappings: @@ -113,10 +113,6 @@ settings: type: info label: How to get the User-Agent default: "
  1. From the same place you fetched the cookie,
  2. Find 'user-agent:' in the Request Headers section
  3. Select and Copy the whole user-agent string (everything after 'user-agent: ') and Paste here.
" - - name: searchanddlurl - label: Search and download URL - type: text - default: www2.yggtorrent.si - name: category type: select label: Catégorie @@ -214,11 +210,9 @@ search: args: [" ", " "] - name: trim paths: - - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{ else }}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - followredirect: true + - path: "{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{ else }}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" # Saison Word - - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Keywords }}{{ re_replace .Keywords \"[sS]0(\\d{1,2})\" \"Saison.$1\"}}{{ else }}&page=50{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - followredirect: true + - path: "{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Keywords }}{{ re_replace .Keywords \"[sS]0(\\d{1,2})\" \"Saison.$1\"}}{{ else }}&page=50{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" rows: selector: table.table > tbody > tr @@ -299,7 +293,7 @@ search: # changed the catid into and hidden div as of last tracker problem selector: ":nth-child(1) > div.hidden" download: - text: "https://{{ .Config.searchanddlurl }}/engine/download_torrent?id={{ .Result._id }}" + text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}" date: selector: td:nth-child(5) filters: diff --git a/src/Jackett.Common/Definitions/yggtorrent.yml b/src/Jackett.Common/Definitions/yggtorrent.yml index c36e373c9..aed36ed50 100644 --- a/src/Jackett.Common/Definitions/yggtorrent.yml +++ b/src/Jackett.Common/Definitions/yggtorrent.yml @@ -7,8 +7,7 @@ type: semi-private encoding: UTF-8 followredirect: true links: - - https://www.yggtorrent.si/ - # don't forget to also change below in settings ! + - https://www2.yggtorrent.si/ legacylinks: - https://yggtorrent.com/ - https://ww1.yggtorrent.com/ @@ -34,6 +33,7 @@ legacylinks: - https://www5.yggtorrent.pe/ - https://yggtorrent.ws/ - https://yggtorrent.se/ + - https://www.yggtorrent.si/ caps: categorymappings: @@ -98,10 +98,6 @@ caps: book-search: [q] settings: - - name: searchanddlurl - label: Search and download URL - type: text - default: www2.yggtorrent.si - name: username type: text label: Username @@ -175,13 +171,11 @@ settings: default: This site may use Cloudflare DDoS Protection, therefore Jackett requires FlareSolver to access it. login: - method: form - path: / - form: "#user-login" + method: post + path: "/user/login" inputs: id: "{{ .Config.username }}" pass: "{{ .Config.password }}" - submit: "" error: - selector: "#login_msg_pass[style=\"\"][style] > center" - selector: "#ban_msg_login[style=\"\"][style] > center" @@ -222,11 +216,9 @@ search: args: [" ", " "] - name: trim paths: - - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{ else }}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - followredirect: true + - path: "{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{ else }}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" # Saison Word - - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Keywords }}{{ re_replace .Keywords \"[sS]0(\\d{1,2})\" \"Saison.$1\"}}{{ else }}&page=50{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - followredirect: true + - path: "{{ if .Config.betasearchengine }}new_search{{ else }}engine{{ end }}/search?category={{ .Config.category }}&name={{ if .Keywords }}{{ re_replace .Keywords \"[sS]0(\\d{1,2})\" \"Saison.$1\"}}{{ else }}&page=50{{ end }}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" rows: selector: table.table > tbody > tr @@ -307,7 +299,7 @@ search: # changed the catid into and hidden div as of last tracker problem selector: ":nth-child(1) > div.hidden" download: - text: "https://{{ .Config.searchanddlurl }}/engine/download_torrent?id={{ .Result._id }}" + text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}" date: selector: td:nth-child(5) filters: