yggcookie: for #6207

This commit is contained in:
Garfield69 2020-07-08 17:05:37 +12:00
parent 9fdd1d358d
commit 61023dcf6e
1 changed files with 38 additions and 24 deletions

View File

@ -103,7 +103,6 @@ settings:
type: info type: info
label: How to get the Cookie label: How to get the Cookie
default: "<ol><li>Login to this tracker with your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)<li>Refresh the page by pressing <b>F5</b><li>Click on the first row entry<li>Select the <b>Headers</b> tab on the Right panel<li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section<li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</ol>" default: "<ol><li>Login to this tracker with your browser<li>Open the <b>DevTools</b> panel by pressing <b>F12</b><li>Select the <b>Network</b> tab<li>Click on the <b>Doc</b> button (Chrome Browser) or <b>HTML</b> button (FireFox)<li>Refresh the page by pressing <b>F5</b><li>Click on the first row entry<li>Select the <b>Headers</b> tab on the Right panel<li>Find <b>'cookie:'</b> in the <b>Request Headers</b> section<li><b>Select</b> and <b>Copy</b> the whole cookie string <i>(everything after 'cookie: ')</i> and <b>Paste</b> here.</ol>"
- name: useragent - name: useragent
type: text type: text
label: User-Agent label: User-Agent
@ -191,25 +190,28 @@ search:
# BY # BY
# One Punch Man S02E10 OR One Punch Man S02E02 # One Punch Man S02E10 OR One Punch Man S02E02
- name: re_replace # S 1-9 & EP >= 10 - 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 - 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 - 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 - 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 - 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 - 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 # END ANIME HACK
- name: replace - name: replace
args: ["\"", ""] args: ["\"", ""]
- name: replace
args: [" ", " "]
- name: trim - name: trim
paths: 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 }}" - 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 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 followredirect: true
rows: rows:
@ -224,19 +226,31 @@ search:
args: "/(\\d+)-" args: "/(\\d+)-"
title_normal: title_normal:
selector: td:nth-child(2) > a 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: title_filtered:
selector: td:nth-child(2) > a text: "{{ .Result.title_normal }}"
filters: filters:
- name: re_replace - 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"] 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 - name: replace
args: [".", " "] args: [".", " "]
- name: trim - name: trim
@ -246,23 +260,23 @@ search:
args: ["(\\s{2,5})", " "] args: ["(\\s{2,5})", " "]
- name: trim - name: trim
title_phase1: 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: title_multilang:
text: "{{ .Result.title_phase1 }}" text: "{{ .Result.title_phase1 }}"
filters: filters:
- name: re_replace - name: re_replace
args: ["[\\.\\s\\[\\-][Mm][Uu][Ll][Tt][Ii][\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."] args: ["(?i)[\\.\\s\\[\\-]multi[\\.\\s\\]\\-]", ".{{ .Config.multilanguage }}."]
title_phase2: 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: title_vostfr:
text: "{{ .Result.title_phase2 }}" text: "{{ .Result.title_phase2 }}"
filters: filters:
- name: re_replace - name: re_replace
args: ["[\\.\\s\\[\\-][Vv][Oo][Ss][Tt][Ff][Rr][\\.\\s\\]\\-]", ".ENGLISH."] args: ["(?i)[\\.\\s\\[\\-]vostfr[\\.\\s\\]\\-]", ".ENGLISH."]
- name: re_replace - name: re_replace
args: ["[\\.\\s\\[\\-][Ss][Uu][Bb][Ff][Rr][Ee][Nn][Cc][Hh][\\.\\s\\]\\-]", ".ENGLISH."] args: ["(?i)[\\.\\s\\[\\-]subfrench[\\.\\s\\]\\-]", ".ENGLISH."]
title_phase3: 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: title_anime:
text: "{{ .Result.title_phase3 }}" text: "{{ .Result.title_phase3 }}"
filters: filters:
@ -271,7 +285,7 @@ search:
- name: re_replace - name: re_replace
args: ["(.*)(\\.| |\\-)(\\d{2,3})(\\.| |\\-)(.*)", "$1 E$3 $5"] args: ["(.*)(\\.| |\\-)(\\d{2,3})(\\.| |\\-)(.*)", "$1 E$3 $5"]
title: 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: details:
selector: td:nth-child(2) > a selector: td:nth-child(2) > a
attribute: href attribute: href