From 61023dcf6ec6cda115fbe94d7c4ae4569ff68ca2 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Wed, 8 Jul 2020 17:05:37 +1200 Subject: [PATCH] yggcookie: for #6207 --- src/Jackett.Common/Definitions/yggcookie.yml | 62 ++++++++++++-------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/src/Jackett.Common/Definitions/yggcookie.yml b/src/Jackett.Common/Definitions/yggcookie.yml index 623e35f0b..2b9790877 100644 --- a/src/Jackett.Common/Definitions/yggcookie.yml +++ b/src/Jackett.Common/Definitions/yggcookie.yml @@ -103,7 +103,6 @@ settings: type: info label: How to get the Cookie default: "
  1. Login to this tracker with your browser
  2. Open the DevTools panel by pressing F12
  3. Select the Network tab
  4. Click on the Doc button (Chrome Browser) or HTML button (FireFox)
  5. Refresh the page by pressing F5
  6. Click on the first row entry
  7. Select the Headers tab on the Right panel
  8. Find 'cookie:' in the Request Headers section
  9. Select and Copy the whole cookie string (everything after 'cookie: ') and Paste here.
" - - name: useragent type: text label: User-Agent @@ -191,25 +190,28 @@ search: # BY # One Punch Man S02E10 OR One Punch Man S02E02 - name: re_replace # S 1-9 & EP >= 10 - args: ["(.*)[sS]([1-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] + args: ["(?i)(.*)s([1-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] - name: re_replace # S 1-9 & EP 1-9 - args: ["(.*)[sS]([1-9])\\s(\\d{1})$", "$1 S0$2E0$3"] + args: ["(?i)(.*)s([1-9])\\s(\\d{1})$", "$1 S0$2E0$3"] - name: re_replace # S >= 10 & EP >= 10 - args: ["(.*)[sS]([1-9][0-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] + args: ["(?i)(.*)s([1-9][0-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] - name: re_replace # S >= 10 & EP 1-9 - args: ["(.*)[sS]([1-9][0-9])\\s(\\d{1})$", "$1 S0$2E0$3"] + args: ["(?i)(.*)s([1-9][0-9])\\s(\\d{1})$", "$1 S0$2E0$3"] - name: re_replace # Full season S 1-9 - args: ["(.*)[sS]([1-9])$", "$1 S0$2"] + args: ["(?i)(.*)s([1-9])$", "$1 S0$2"] - name: re_replace # Full season S >= 10 - args: ["(.*)[sS]([1-9][0-9])$", "$1 S$2"] + args: ["(?i)(.*)s([1-9][0-9])$", "$1 S$2"] # END ANIME HACK - name: replace args: ["\"", ""] + - name: replace + 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: "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 }}&page=50" + # Saison Word + - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ re_replace .Keywords \"[sS]0(\\d{1,2})\" \"Saison.$1\"}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" followredirect: true rows: @@ -224,19 +226,31 @@ search: args: "/(\\d+)-" title_normal: selector: td:nth-child(2) > a + filters: + - name: re_replace # S 1-9 & EP >= 10 + args: ["(?i)(.*)s([1-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] + - name: re_replace # S 1-9 & EP 1-9 + args: ["(?i)(.*)s([1-9])\\s(\\d{1})$", "$1 S0$2E0$3"] + - name: re_replace # S >= 10 & EP >= 10 + args: ["(?i)(.*)s([1-9][0-9])\\s(\\d{2,3})$", "$1 S0$2E$3"] + - name: re_replace # S >= 10 & EP 1-9 + args: ["(?i)(.*)s([1-9][0-9])\\s(\\d{1})$", "$1 S0$2E0$3"] + - name: re_replace # Full season S 1-9 + args: ["(?i)(.*)s([1-9])$", "$1 S0$2"] + - name: re_replace # Full season S >= 10 + args: ["(?i)(.*)s([1-9][0-9])$", "$1 S$2"] + - name: re_replace + args: ["(?i)(multi)", "MULTi"] + # Replace French Saison by Season + - name: re_replace + args: ["(?i)(saison|saison )([1-9])", "S0$2"] + - name: re_replace + args: ["(?i)(saison|saison )(\\d{1,4})", "S$2"] title_filtered: - selector: td:nth-child(2) > a + text: "{{ .Result.title_normal }}" filters: - name: re_replace args: ["(?i)^(?:(.+?)((?:[\\.\\-\\s_\\[]+(?:imax|(?:dvd|bd|tv)(?:rip|scr)|bluray(?:\\-?rip)?|720\\s*p?|1080\\s*p?|vof?|vost(?:fr)?|multi|vf(?:f|q)?[1-3]?|(?:true)?french|eng?)[\\.\\-\\s_\\]]*)*)([\\(\\[]?(?:20|1[7-9])\\d{2}[\\)\\]]?)(.*)$|(.*))$", "$1 $3 $2 $4 $5"] - # Replace Saison/saison by 'S' to match for Full season search Sonarrv3 and tidy up - - name: re_replace - args: ["([Ss]aison|[Ss]aison )(\\d{1,4})", "S$2"] - - name: re_replace - args: ["S(\\d+)E(\\d+)(\\D+)", "S$1E$2 $3"] - - name: re_replace - args: ["([Mm][Uu][Ll][Tt][Ii])", "MULTi"] - # End tidy up for sonarrv3 season search - name: replace args: [".", " "] - name: trim @@ -246,23 +260,23 @@ search: args: ["(\\s{2,5})", " "] - name: trim title_phase1: - text: "{{if .Config.filter_title }}{{ .Result.title_filtered }}{{else}}{{ .Result.title_normal }}{{end}}" + text: "{{ if .Config.filter_title }}{{ .Result.title_filtered }}{{ else }}{{ .Result.title_normal }}{{ end }}" title_multilang: text: "{{ .Result.title_phase1 }}" filters: - name: re_replace - args: ["[\\.\\s\\[\\-][Mm][Uu][Ll][Tt][Ii][\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."] + args: ["(?i)[\\.\\s\\[\\-]multi[\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."] title_phase2: - text: "{{if .Config.multilang }}{{ .Result.title_multilang }}{{else}}{{ .Result.title_phase1 }}{{end}}" + text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{else}}{{ .Result.title_phase1 }}{{end}}" title_vostfr: text: "{{ .Result.title_phase2 }}" filters: - name: re_replace - args: ["[\\.\\s\\[\\-][Vv][Oo][Ss][Tt][Ff][Rr][\\.\\s\\]\\-]", ".ENGLISH."] + args: ["(?i)[\\.\\s\\[\\-]vostfr[\\.\\s\\]\\-]", ".ENGLISH."] - name: re_replace - args: ["[\\.\\s\\[\\-][Ss][Uu][Bb][Ff][Rr][Ee][Nn][Cc][Hh][\\.\\s\\]\\-]", ".ENGLISH."] + args: ["(?i)[\\.\\s\\[\\-]subfrench[\\.\\s\\]\\-]", ".ENGLISH."] title_phase3: - text: "{{if .Config.vostfr }}{{ .Result.title_vostfr }}{{else}}{{ .Result.title_phase2 }}{{end}}" + text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{else}}{{ .Result.title_phase2 }}{{end}}" title_anime: text: "{{ .Result.title_phase3 }}" filters: @@ -271,7 +285,7 @@ search: - name: re_replace args: ["(.*)(\\.| |\\-)(\\d{2,3})(\\.| |\\-)(.*)", "$1 E$3 $5"] title: - text: "{{if .Config.enhancedAnime }}{{ .Result.title_anime }}{{else}}{{ .Result.title_phase3 }}{{end}}" + text: "{{ if .Config.enhancedAnime }}{{ .Result.title_anime }}{{else}}{{ .Result.title_phase3 }}{{end}}" details: selector: td:nth-child(2) > a attribute: href