This commit is contained in:
kaso17 2017-12-27 17:46:13 +01:00
commit ff1e19dbc7
8 changed files with 78 additions and 41 deletions

View File

@ -3,7 +3,7 @@
[![GitHub issues](https://img.shields.io/github/issues/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/issues) [![GitHub issues](https://img.shields.io/github/issues/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/pulls) [![GitHub pull requests](https://img.shields.io/github/issues-pr/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/pulls)
[![Bountysource](https://img.shields.io/bountysource/team/jackett/activity.svg?style=flat-square)](https://www.bountysource.com/teams/jackett) [![Bountysource](https://img.shields.io/bountysource/team/jackett/activity.svg?style=flat-square)](https://www.bountysource.com/teams/jackett)
[![Build status](https://ci.appveyor.com/api/projects/status/gaybh5mvyx418nsp/branch/master?svg=true)](https://ci.appveyor.com/project/camjac251/jackett) [![Build status](https://ci.appveyor.com/api/projects/status/gaybh5mvyx418nsp/branch/master?svg=true)](https://ci.appveyor.com/project/Jackett/jackett)
[![Github Releases](https://img.shields.io/github/downloads/Jackett/Jackett/total.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/releases/latest) [![Github Releases](https://img.shields.io/github/downloads/Jackett/Jackett/total.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/releases/latest)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/jackett.svg?maxAge=60&style=flat-square)](https://hub.docker.com/r/linuxserver/jackett/) [![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/jackett.svg?maxAge=60&style=flat-square)](https://hub.docker.com/r/linuxserver/jackett/)
[![Discord](https://img.shields.io/badge/discord-chat-7289DA.svg?maxAge=60&style=flat-square)](https://discord.gg/J865QuA) [![Discord](https://img.shields.io/badge/discord-chat-7289DA.svg?maxAge=60&style=flat-square)](https://discord.gg/J865QuA)

View File

@ -6,6 +6,8 @@
type: private type: private
encoding: UTF-8 encoding: UTF-8
links: links:
- https://downloadville.net/
legacylinks:
- https://downloadville.net/tracker/ - https://downloadville.net/tracker/
caps: caps:
@ -128,7 +130,7 @@
"4" : "Argent & Or (Both)" "4" : "Argent & Or (Both)"
login: login:
path: index.php?page=login path: tracker/index.php?page=login
method: post method: post
form: form[action="index.php?page=login"] form: form[action="index.php?page=login"]
inputs: inputs:
@ -139,12 +141,12 @@
message: message:
selector: form[action="index.php?page=login&returnto=index.php"] table tr:nth-of-type(2) td span selector: form[action="index.php?page=login&returnto=index.php"] table tr:nth-of-type(2) td span
test: test:
path: index.php path: tracker/index.php
select: a[href="logout.php"] select: a[href="logout.php"]
download: download:
before: before:
path: "thanks.php" path: tracker/thanks.php
method: "post" method: "post"
inputs: inputs:
infohash: "{{ .DownloadUri.Query.id }}" infohash: "{{ .DownloadUri.Query.id }}"
@ -154,7 +156,7 @@
search: search:
paths: paths:
- path: index.php - path: tracker/index.php
inputs: inputs:
page: "torrents" page: "torrents"
search: "{{ .Keywords }}" search: "{{ .Keywords }}"

View File

@ -91,19 +91,20 @@
search: search:
paths: paths:
- path: "/new/{{if .Keywords}}search-torrents.php?{{range .Categories }}c{{.}}=1&{{end}}search={{.Keywords}}{{else}}{{end}}" - path: "{{ if .Keywords }}usearch/torrents-search.php?{{range .Categories }}c{{.}}=1&{{end}}q={{.Keywords}}{{else}}torrents/top-100-latest-uploads.html{{end}}"
rows: rows:
selector: table.ttable_headinner > tbody > tr[class^="t-row"] selector: table[class="table table--bordered table--striped table--hover torrents_table sortable"] > tbody > tr
filters:
- name: andmatch
fields: fields:
download:
selector: a[data-download]
attribute: href
title: title:
selector: a.cellMainLink selector: a.torrents_table__torrent_title b
details:
selector: a.torrents_table__torrent_title b
attribute: href
download:
selector: a[href^="magnet:?xt="]
attribute: href
category: category:
selector: span[id^="cat_"] selector: span.torrents_table__upload_info
case: case:
":has(a:contains(\"Anime\")):contains(\"English Translated\")": 118 ":has(a:contains(\"Anime\")):contains(\"English Translated\")": 118
":has(a:contains(\"Anime\")):contains(\"Other\")": 133 ":has(a:contains(\"Anime\")):contains(\"Other\")": 133
@ -177,20 +178,19 @@
":has(a:contains(\"XXX\")):contains(\"Videos\")": 119 ":has(a:contains(\"XXX\")):contains(\"Videos\")": 119
":has(a:contains(\"XXX\")):contains(\"XXX Games\")": 126 ":has(a:contains(\"XXX\")):contains(\"XXX Games\")": 126
"*": 0 # some older torrents's don't have a category "*": 0 # some older torrents's don't have a category
details:
selector: a.cellMainLink
attribute: href
size: size:
selector: td:nth-child(2) selector: td[data-title="Size"]
files:
selector: td[data-title="Files"]
date: date:
selector: td:nth-child(3) selector: td[data-title="Age"]
filters: filters:
- name: dateparse - name: dateparse
args: "02-01-2006 15:04:05 -07:00" args: "2006-01-02 15:04:05"
seeders: seeders:
selector: td:nth-child(4) selector: td[data-title="Seed"]
leechers: leechers:
selector: td:nth-child(5) selector: td[data-title="Leech"]
downloadvolumefactor: downloadvolumefactor:
text: "0" text: "0"
uploadvolumefactor: uploadvolumefactor:

View File

@ -22,10 +22,18 @@
search: [q] search: [q]
tv-search: [q, season, ep] tv-search: [q, season, ep]
settings: [] settings:
- name: downloadlink
type: select
label: Download link
default: "magnet:"
options:
"http://itorrents.org/" : "iTorrents.org"
"magnet:": "magnet"
download: download:
selector: a.csprite_dltorrent[href^="magnet:?xt"] # the .torrent url is on the on the details page
selector: a.csprite_dltorrent[href^="{{ .Config.downloadlink }}"]
search: search:
paths: paths:

View File

@ -6,6 +6,8 @@
type: semi-private type: semi-private
encoding: windows-1250 encoding: windows-1250
links: links:
- http://sktorrent.eu/
legacylinks:
- http://sktorrent.eu/torrent/ - http://sktorrent.eu/torrent/
caps: caps:
@ -46,7 +48,7 @@
movie-search: [q] movie-search: [q]
login: login:
path: /torrent/login.php path: torrent/login.php
method: form method: form
form: form[action^="login.php?returnto=index.php"] form: form[action^="login.php?returnto=index.php"]
inputs: inputs:
@ -55,11 +57,11 @@
error: error:
- selector: font:contains("Incorrect") - selector: font:contains("Incorrect")
test: test:
path: /torrent/index.php path: torrent/index.php
search: search:
paths: paths:
- path: /torrent/torrents.php - path: torrent/torrents.php
inputs: inputs:
search: "{{ .Keywords }}" search: "{{ .Keywords }}"
category: "{{range .Categories}}{{.}};{{end}}" category: "{{range .Categories}}{{.}};{{end}}"

View File

@ -220,6 +220,11 @@
,a[href^="torrents.php?cat=228"] ,a[href^="torrents.php?cat=228"]
,a[href^="torrents.php?cat=191"] ,a[href^="torrents.php?cat=191"]
attribute: href attribute: href
year:
selector: td.label > div:contains("Lançamento:")
filters:
- name: replace
args: ["Lançamento:", ""]
title_anime: title_anime:
selector: a[href^="torrents-details.php?id="] selector: a[href^="torrents-details.php?id="]
filters: filters:
@ -227,6 +232,9 @@
args: ["(Ep[\\.]?[ ]?)|([S]\\d\\d[Ee])", "E"] args: ["(Ep[\\.]?[ ]?)|([S]\\d\\d[Ee])", "E"]
title_normal: title_normal:
selector: a[href^="torrents-details.php?id="] selector: a[href^="torrents-details.php?id="]
filters:
- name: re_replace
args: ["^(.*?) - ((S(\\d{1,2}))?E(\\d{1,3}))", "$1 {{.Result.year}} $2"]
title: title:
text: "{{if .Result.is_anime }}{{ .Result.title_anime }}{{else}}{{ .Result.title_normal }}{{end}}" text: "{{if .Result.is_anime }}{{ .Result.title_anime }}{{else}}{{ .Result.title_normal }}{{end}}"
filters: filters:
@ -234,11 +242,16 @@
args: ["^(\\[XXX]\\s)", ""] args: ["^(\\[XXX]\\s)", ""]
- name: replace - name: replace
args: [" - NOVO!", ""] args: [" - NOVO!", ""]
title|append: - name: re_replace
selector: td.label > div:contains("Lançamento:") args: ["(\\d{2})ª a (\\d{2})ª Temporada", "S$1-$2"]
filters: - name: re_replace
- name: replace args: ["(\\d{1})ª a (\\d{1})ª Temporada", "S0$1-0$2"]
args: ["Lançamento:", ""] - name: re_replace
args: ["(\\d{1})ª a (\\d{2})ª Temporada", "S0$1-$2"]
- name: re_replace
args: ["(\\d{2})ª Temporada", "S$1"]
- name: re_replace
args: ["(\\d{1})ª Temporada", "S0$1"]
title|append: title|append:
optional: true optional: true
selector: td.label > div:contains("Qualidade:") selector: td.label > div:contains("Qualidade:")

View File

@ -6,6 +6,8 @@
type: private type: private
encoding: UTF-8 encoding: UTF-8
links: links:
- http://www.torrentbd.com/
legacylinks:
- http://www.torrentbd.com/torrent - http://www.torrentbd.com/torrent
caps: caps:
@ -80,7 +82,7 @@
tv-search: [q, season, ep] tv-search: [q, season, ep]
login: login:
path: account-login.php path: torrent/account-login.php
method: form method: form
form: form[action="account-login.php"] form: form[action="account-login.php"]
inputs: inputs:
@ -89,11 +91,11 @@
error: error:
- selector: div.myFrame:has(div.myF-caption > font.error) - selector: div.myFrame:has(div.myF-caption > font.error)
test: test:
path: torrents-search.php path: torrent/torrents-search.php
selector: div.myB-content:contains("Ratio:") selector: div.myB-content:contains("Ratio:")
ratio: ratio:
path: torrents-search.php path: torrent/torrents-search.php
selector: div.myB-content:contains("Ratio:") selector: div.myB-content:contains("Ratio:")
filters: filters:
- name: regexp - name: regexp
@ -101,7 +103,7 @@
search: search:
paths: paths:
- path: torrents-search.php - path: torrent/torrents-search.php
inputs: inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}" $raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{ .Query.Keywords }}" search: "{{ .Query.Keywords }}"

View File

@ -238,20 +238,22 @@ Encoding = Encoding.UTF8;
ICollection<int> Category = null; ICollection<int> Category = null;
string YearStr = null; string YearStr = null;
Nullable<DateTime> YearPublishDate = null; Nullable<DateTime> YearPublishDate = null;
string CategoryStr = "";
if (Row.ClassList.Contains("group") || Row.ClassList.Contains("torrent")) // group/ungrouped headers if (Row.ClassList.Contains("group") || Row.ClassList.Contains("torrent")) // group/ungrouped headers
{ {
var qCatLink = Row.QuerySelector("a[href^=\"/torrents.php?filter_cat\"]"); var qCatLink = Row.QuerySelector("a[href^=\"/torrents.php?filter_cat\"]");
string CategoryStr = qCatLink.GetAttribute("href").Split('=')[1].Split('&')[0]; CategoryStr = qCatLink.GetAttribute("href").Split('=')[1].Split('&')[0];
Category = MapTrackerCatToNewznab(CategoryStr); Category = MapTrackerCatToNewznab(CategoryStr);
YearStr = qDetailsLink.NextSibling.TextContent.Trim().TrimStart('[').TrimEnd(']');
YearPublishDate = DateTime.SpecifyKind(DateTime.ParseExact(YearStr, "yyyy", CultureInfo.InvariantCulture), DateTimeKind.Unspecified);
// if result is an anime, convert title from SXXEXX to EXX // if result is an anime, convert title from SXXEXX to EXX
if (CategoryStr == "14") if (CategoryStr == "14")
{ {
Title = Regex.Replace(Title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "E"); Title = Regex.Replace(Title, @"(Ep[\.]?[ ]?)|([S]\d\d[Ee])", "E");
} }
YearStr = qDetailsLink.NextSibling.TextContent.Trim().TrimStart('[').TrimEnd(']');
YearPublishDate = DateTime.SpecifyKind(DateTime.ParseExact(YearStr, "yyyy", CultureInfo.InvariantCulture), DateTimeKind.Unspecified);
if (Row.ClassList.Contains("group")) // group headers if (Row.ClassList.Contains("group")) // group headers
{ {
@ -278,7 +280,11 @@ Encoding = Encoding.UTF8;
if (Row.ClassList.Contains("group_torrent")) // torrents belonging to a group if (Row.ClassList.Contains("group_torrent")) // torrents belonging to a group
{ {
release.Description = qDetailsLink.TextContent; release.Description = qDetailsLink.TextContent;
release.Title = GroupTitle + " " + GroupYearStr;
string cleanTitle = Regex.Replace(GroupTitle, @" - S?(?<season>\d{1,2})?E?(?<episode>\d{1,4})?", "");
string seasonEp = Regex.Replace(GroupTitle, @"^(.*?) - (S?(\d{1,2})?E?(\d{1,4})?)?", "$2");
release.Title = CategoryStr == "14" ? GroupTitle : cleanTitle + " " + GroupYearStr + " " + seasonEp;
release.PublishDate = GroupPublishDate.Value; release.PublishDate = GroupPublishDate.Value;
release.Category = GroupCategory; release.Category = GroupCategory;
} }
@ -286,7 +292,11 @@ Encoding = Encoding.UTF8;
{ {
var qDescription = Row.QuerySelector("div.torrent_info"); var qDescription = Row.QuerySelector("div.torrent_info");
release.Description = qDescription.TextContent; release.Description = qDescription.TextContent;
release.Title = Title + " " + YearStr;
string cleanTitle = Regex.Replace(Title, @" - ((S(\d{1,2}))?E(\d{1,4}))", "");
string seasonEp = Regex.Replace(Title, @"^(.*?) - ((S(\d{1,2}))?E(\d{1,4}))", "$2");
release.Title = CategoryStr == "14" ? Title : cleanTitle + " " + YearStr + " " + seasonEp;
release.PublishDate = YearPublishDate.Value; release.PublishDate = YearPublishDate.Value;
release.Category = Category; release.Category = Category;
} }