diff --git a/src/Jackett.Common/Definitions/magicheaven.yml b/src/Jackett.Common/Definitions/magicheaven.yml index d096644a5..4cccd9f4d 100644 --- a/src/Jackett.Common/Definitions/magicheaven.yml +++ b/src/Jackett.Common/Definitions/magicheaven.yml @@ -140,15 +140,15 @@ search: filters: - name: querystring args: category - a_title: + title_default: # is often abbreviated selector: a[href*="details.php?id="] - d_title: + title_optional: # usually longer than details title selector: div[id^="port-content-"] div optional: true title: - text: "{{ if .Result.d_title }}{{ .Result.d_title }}{{ else }}{{ .Result.a_title }}{{ end }}" + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" details: selector: a[href*="details.php?id="] attribute: href diff --git a/src/Jackett.Common/Definitions/magico.yml b/src/Jackett.Common/Definitions/magico.yml index b834885fa..d5fb22c62 100644 --- a/src/Jackett.Common/Definitions/magico.yml +++ b/src/Jackett.Common/Definitions/magico.yml @@ -182,7 +182,7 @@ search: download: selector: a[href*="?p=torrents"][href*="&action=download"] attribute: href - imdb: + imdbid: selector: a[href*="imdb.com/title/tt"] attribute: href size: @@ -197,7 +197,6 @@ search: selector: a[rel="fancybox"] attribute: href description: - optional: true selector: div.torrentDetails > div:has(span.floatright) downloadvolumefactor: case: @@ -206,11 +205,12 @@ search: uploadvolumefactor: case: "*": 1 - date: + date_unix: optional: true selector: div.torrentOwner > abbr.timeago attribute: data-time - date: + date_day: + # Uploaded Yesterday at 20:12 by optional: true selector: div.torrentOwner:not(:has(abbr.timeago)):contains("day"), div.torrentOwner:not(:has(abbr.timeago)):contains("σήμερα"), div.torrentOwner:not(:has(abbr.timeago)):contains("εχθές"), div.torrentOwner:not(:has(abbr.timeago)):contains("Δευτέρα"), div.torrentOwner:not(:has(abbr.timeago)):contains("Τρίτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Τετάρτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Πέμπτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Παρασκευή"), div.torrentOwner:not(:has(abbr.timeago)):contains("Σάββατο"), div.torrentOwner:not(:has(abbr.timeago)):contains("Κυριακή") remove: span @@ -246,7 +246,8 @@ search: - name: replace args: ["Κυριακή", "Sunday"] - name: fuzzytime - date: + date_year: + # 23-10-2021 22:59 optional: true selector: div.torrentOwner:not(:has(abbr.timeago)):contains("-") remove: span @@ -269,8 +270,7 @@ search: args: " +00:00" # auto adjusted by site account profile - name: dateparse args: "02-01-2006 15:04 -07:00" - date: - #
Uploaded Saturday at 21:09 by + date_other: optional: true selector: td.torrent_name remove: div, a, span @@ -285,4 +285,6 @@ search: args: " +00:00" # auto adjusted by site account profile - name: dateparse args: "02-01-2006 15:04 -07:00" + date: + text: "{{ if .Result.date_unix .Result.date_day or .Result.date_year or .Result.date_other }}{{ or .Result.date_unix .Result.date_day or .Result.date_year or .Result.date_other }}{{ else }}now{{ end }}" # TSUE 2.2 diff --git a/src/Jackett.Common/Definitions/majomparade.yml b/src/Jackett.Common/Definitions/majomparade.yml index 98d5585e2..086faf137 100644 --- a/src/Jackett.Common/Definitions/majomparade.yml +++ b/src/Jackett.Common/Definitions/majomparade.yml @@ -65,7 +65,6 @@ settings: - name: useragent type: text label: User-Agent - label: User-Agent - name: info_useragent type: info label: How to get the User-Agent @@ -106,16 +105,18 @@ search: download: selector: a[href^="download.php?torrent="] attribute: href - title: + title_default: selector: a[href^="details.php?id="] > b attribute: title - title: + title_optional: selector: a[href^="details.php?id="] > b[title*="Torrent neve:"] optional: true attribute: title filters: - name: regexp args: "Torrent neve: (.*?)<" + title: + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" description: selector: a[href^="details.php?id="] > b attribute: title @@ -131,7 +132,7 @@ search: details: selector: a[href^="details.php?id="] attribute: href - imdb: + imdbid: selector: a[href*="imdb.com/title/tt"] attribute: href poster: diff --git a/src/Jackett.Common/Definitions/marinetracker.yml b/src/Jackett.Common/Definitions/marinetracker.yml index f32baa876..bca9cd9ee 100644 --- a/src/Jackett.Common/Definitions/marinetracker.yml +++ b/src/Jackett.Common/Definitions/marinetracker.yml @@ -262,11 +262,11 @@ search: args: f description: selector: td span.iconDL - size: - text: 0 - size: + size_optional: selector: td:nth-last-child(5) > u optional: true + size: + text: "{{ if .Result.size_optional }}{{ .Result.size_optional }}{{ else }}0 B{{ end }}" seeders: selector: td.seedmed leechers: diff --git a/src/Jackett.Common/Definitions/megapeer.yml b/src/Jackett.Common/Definitions/megapeer.yml index 6a5e7157a..a771bdd17 100644 --- a/src/Jackett.Common/Definitions/megapeer.yml +++ b/src/Jackett.Common/Definitions/megapeer.yml @@ -146,9 +146,8 @@ search: leechers: text: 1 date: + # Добавлен: 5 октября 2021 в 06:56:08 selector: p - filters: - # Добавлен: 5 октября 2021 в 06:56:08 filters: - name: replace args: ["Добавлен: ", ""] diff --git a/src/Jackett.Common/Definitions/mesevilag.yml b/src/Jackett.Common/Definitions/mesevilag.yml index dd7815699..3b44a5aa5 100644 --- a/src/Jackett.Common/Definitions/mesevilag.yml +++ b/src/Jackett.Common/Definitions/mesevilag.yml @@ -123,7 +123,7 @@ search: filters: - name: replace args: ["span_bookmark_", "download.php?id="] - imdb: + imdbid: selector: a[href*="imdb.com/title/tt"] attribute: href poster: diff --git a/src/Jackett.Common/Definitions/microbit.yml b/src/Jackett.Common/Definitions/microbit.yml index 7070cde97..a4106b738 100644 --- a/src/Jackett.Common/Definitions/microbit.yml +++ b/src/Jackett.Common/Definitions/microbit.yml @@ -142,22 +142,22 @@ search: args: " +01:00" # CET - name: dateparse args: "2006.01.02. 15:04 -07:00" - downloadvolumefactor: - text: 1 - downloadvolumefactor: + downloadvolumefactor_optional: optional: true selector: b:has(img[src="templates/default/images/header/arrowdown.gif"]) filters: - name: regexp args: (\d+\.*\d*) - uploadvolumefactor: - text: 1 - uploadvolumefactor: + downloadvolumefactor: + text: "{{ if .Result.downloadvolumefactor_optional }}{{ .Result.downloadvolumefactor_optional }}{{ else }}1{{ end }}" + uploadvolumefactor_optional: optional: true selector: b:has(img[src="templates/default/images/header/arrowup.gif"]) filters: - name: regexp args: (\d+) + uploadvolumefactor: + text: "{{ if .Result.uploadvolumefactor_optional }}{{ .Result.uploadvolumefactor_optional }}{{ else }}1{{ end }}" minimumratio: text: 0.6 minimumseedtime: diff --git a/src/Jackett.Common/Definitions/moviesdvdr.yml b/src/Jackett.Common/Definitions/moviesdvdr.yml index 903f891f8..7309d848f 100644 --- a/src/Jackett.Common/Definitions/moviesdvdr.yml +++ b/src/Jackett.Common/Definitions/moviesdvdr.yml @@ -39,67 +39,65 @@ search: fields: category: text: 1 - title: - selector: div.titulo - filters: - - name: append - args: " " - title|append: + multi: optional: true selector: img.flageitor:nth-child(2) filters: - name: re_replace args: [".*", "MULTi "] - title|append: + eng: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/english.png"] filters: - name: re_replace args: [".*", "English "] - title|append: + esp: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/espanol.png"] filters: - name: re_replace args: [".*", "SPANiSH "] - title|append: + ita: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/italian.png"] filters: - name: re_replace args: [".*", "iTALiAN "] - title|append: + deu: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/german.png"] filters: - name: re_replace args: [".*", "German "] - title|append: + fra: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/french.png"] filters: - name: re_replace args: [".*", "FRENCH "] - title|append: + oth: optional: true selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/other.png"] filters: - name: re_replace args: [".*", "oTHer "] - title|append: + doc: optional: true selector: div.imagem span:contains("Documental") filters: - name: re_replace args: ["Documental", "DOC "] - title|append: + 3x: optional: true selector: div.imagem span:contains("Adulto") filters: - name: replace args: ["Adulto", "XXX "] - title|append: - text: "DVDRiP XViD" + title: + selector: div.titulo + filters: + - name: append + args: " {{ .Result.multi }}{{ .Result.eng }}{{ .Result.esp }}{{ .Result.ita }}{{ .Result.deu }}{{ .Result.fra }}{{ .Result.oth }}{{ .Result.doc }}{{ .Result.3x }}DVDRiP XViD" details: selector: a attribute: href diff --git a/src/Jackett.Common/Definitions/mteamtp.yml b/src/Jackett.Common/Definitions/mteamtp.yml index 9efe2d3e6..11acc7c11 100644 --- a/src/Jackett.Common/Definitions/mteamtp.yml +++ b/src/Jackett.Common/Definitions/mteamtp.yml @@ -131,12 +131,16 @@ search: selector: table.torrents > tbody > tr:has(table.torrentname) fields: - title: # shortened for long release names + title_default: + # shortened for long release names selector: a[href^="details.php?id="] > b - title: - optional: true # not available if IMDB tooltips are turned on + title_optional: + # not available if IMDB tooltips are turned on + optional: true selector: a[title][href^="details.php?id="] attribute: title + title: + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" category: selector: a[href^="?cat="] attribute: href @@ -155,7 +159,7 @@ search: filters: - name: replace args: ["pic/nopic.jpg", ""] - imdb: + imdbid: selector: a[href*="imdb.com/title/tt"] attribute: href size: @@ -166,15 +170,7 @@ search: selector: td.rowfollow:nth-last-child(5) leechers: selector: td.rowfollow:nth-last-child(4) - date: - selector: td.rowfollow:nth-last-child(7):not(:has(span)) - optional: true - filters: - - name: append - args: " +08:00" # CST - - name: dateparse - args: "2006-01-0215:04:05 -07:00" - date: + date_added: selector: td.rowfollow:nth-last-child(7) > span[title] optional: true attribute: title @@ -183,6 +179,16 @@ search: args: " +08:00" # CST - name: dateparse args: "2006-01-02 15:04:05 -07:00" + date_elapsed: + selector: td.rowfollow:nth-last-child(7):not(:has(span)) + optional: true + filters: + - name: append + args: " +08:00" # CST + - name: dateparse + args: "2006-01-0215:04:05 -07:00" + date: + text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}" downloadvolumefactor: case: img.pro_free: 0 diff --git a/src/Jackett.Common/Definitions/mteamtp2fa.yml b/src/Jackett.Common/Definitions/mteamtp2fa.yml index 320b387aa..ea44642b7 100644 --- a/src/Jackett.Common/Definitions/mteamtp2fa.yml +++ b/src/Jackett.Common/Definitions/mteamtp2fa.yml @@ -127,12 +127,16 @@ search: selector: table.torrents > tbody > tr:has(table.torrentname) fields: - title: # shortened for long release names + title_default: + # shortened for long release names selector: a[href^="details.php?id="] > b - title: - optional: true # not available if IMDB tooltips are turned on + title_optional: + # not available if IMDB tooltips are turned on + optional: true selector: a[title][href^="details.php?id="] attribute: title + title: + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" category: selector: a[href^="?cat="] attribute: href @@ -151,7 +155,7 @@ search: filters: - name: replace args: ["pic/nopic.jpg", ""] - imdb: + imdbid: selector: a[href*="imdb.com/title/tt"] attribute: href size: @@ -162,15 +166,7 @@ search: selector: td.rowfollow:nth-last-child(5) leechers: selector: td.rowfollow:nth-last-child(4) - date: - selector: td.rowfollow:nth-last-child(7):not(:has(span)) - optional: true - filters: - - name: append - args: " +08:00" # CST - - name: dateparse - args: "2006-01-0215:04:05 -07:00" - date: + date_added: selector: td.rowfollow:nth-last-child(7) > span[title] optional: true attribute: title @@ -179,6 +175,16 @@ search: args: " +08:00" # CST - name: dateparse args: "2006-01-02 15:04:05 -07:00" + date_elapsed: + selector: td.rowfollow:nth-last-child(7):not(:has(span)) + optional: true + filters: + - name: append + args: " +08:00" # CST + - name: dateparse + args: "2006-01-0215:04:05 -07:00" + date: + text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}" downloadvolumefactor: case: img.pro_free: 0 diff --git a/src/Jackett.Common/Definitions/muziekfabriek.yml b/src/Jackett.Common/Definitions/muziekfabriek.yml index fe7308372..a7e8d8287 100644 --- a/src/Jackett.Common/Definitions/muziekfabriek.yml +++ b/src/Jackett.Common/Definitions/muziekfabriek.yml @@ -137,16 +137,16 @@ search: args: " +01:00" # CET - name: dateparse args: "2 January 2006 15:04:05 -07:00" - seeders: - text: 0 - seeders: + seeders_optional: optional: true selector: td:nth-child(4) table tr:nth-child(3) td:nth-child(5) font b - leechers: - text: 0 - leechers: + seeders: + text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}" + leechers_optional: optional: true selector: td:nth-child(4) table tr:nth-child(3) td:nth-child(5) font font b + leechers: + text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}" downloadvolumefactor: text: 0 uploadvolumefactor: diff --git a/src/Jackett.Common/Definitions/mvgroupforum.yml b/src/Jackett.Common/Definitions/mvgroupforum.yml index b5c678c67..c4da9ad61 100644 --- a/src/Jackett.Common/Definitions/mvgroupforum.yml +++ b/src/Jackett.Common/Definitions/mvgroupforum.yml @@ -157,10 +157,10 @@ search: fields: category: text: Other - title: + title_default: # fallback title (to prevent abend if optional is not found) text: "title not found" - title: + title_optional: optional: true selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="] filters: @@ -196,6 +196,8 @@ search: args: ["(?i)^Al-Jazeera (.*)", "{{ if .Config.dropbbc }}{{ else }}Al-Jazeera {{ end }}$1"] - name: append args: "{{ if .Config.stripS01E01 }}{{ else }} S01E01{{ end }}" + title: + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" details: optional: true selector: td.singleindent a[href^="/index.php?showtopic="] diff --git a/src/Jackett.Common/Definitions/mvgroupmain.yml b/src/Jackett.Common/Definitions/mvgroupmain.yml index a14136ec5..e564fac43 100644 --- a/src/Jackett.Common/Definitions/mvgroupmain.yml +++ b/src/Jackett.Common/Definitions/mvgroupmain.yml @@ -157,10 +157,10 @@ search: fields: category: text: Other - title: + title_default: # fallback title (to prevent abend if optional is not found) text: "title not found" - title: + title_optional: optional: true selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="] filters: @@ -196,6 +196,8 @@ search: args: ["(?i)^Al-Jazeera (.*)", "{{ if .Config.dropbbc }}{{ else }}Al-Jazeera {{ end }}$1"] - name: append args: "{{ if .Config.stripS01E01 }}{{ else }} S01E01{{ end }}" + title: + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" details: optional: true selector: td.singleindent a[href^="/index.php?showtopic="]