diff --git a/README.md b/README.md index ca958d948..7aaa81a23 100644 --- a/README.md +++ b/README.md @@ -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 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) -[![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) [![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) diff --git a/src/Jackett.Common/Definitions/downloadville.yml b/src/Jackett.Common/Definitions/downloadville.yml index f353f58cf..d7ae5f3cd 100644 --- a/src/Jackett.Common/Definitions/downloadville.yml +++ b/src/Jackett.Common/Definitions/downloadville.yml @@ -6,6 +6,8 @@ type: private encoding: UTF-8 links: + - https://downloadville.net/ + legacylinks: - https://downloadville.net/tracker/ caps: @@ -128,7 +130,7 @@ "4" : "Argent & Or (Both)" login: - path: index.php?page=login + path: tracker/index.php?page=login method: post form: form[action="index.php?page=login"] inputs: @@ -139,12 +141,12 @@ message: selector: form[action="index.php?page=login&returnto=index.php"] table tr:nth-of-type(2) td span test: - path: index.php + path: tracker/index.php select: a[href="logout.php"] download: before: - path: "thanks.php" + path: tracker/thanks.php method: "post" inputs: infohash: "{{ .DownloadUri.Query.id }}" @@ -154,7 +156,7 @@ search: paths: - - path: index.php + - path: tracker/index.php inputs: page: "torrents" search: "{{ .Keywords }}" diff --git a/src/Jackett.Common/Definitions/kickasstorrent.yml b/src/Jackett.Common/Definitions/kickasstorrent.yml index 4632bfd90..e2c906656 100644 --- a/src/Jackett.Common/Definitions/kickasstorrent.yml +++ b/src/Jackett.Common/Definitions/kickasstorrent.yml @@ -91,19 +91,20 @@ search: 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: - selector: table.ttable_headinner > tbody > tr[class^="t-row"] - filters: - - name: andmatch + selector: table[class="table table--bordered table--striped table--hover torrents_table sortable"] > tbody > tr fields: - download: - selector: a[data-download] - attribute: href 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: - selector: span[id^="cat_"] + selector: span.torrents_table__upload_info case: ":has(a:contains(\"Anime\")):contains(\"English Translated\")": 118 ":has(a:contains(\"Anime\")):contains(\"Other\")": 133 @@ -177,20 +178,19 @@ ":has(a:contains(\"XXX\")):contains(\"Videos\")": 119 ":has(a:contains(\"XXX\")):contains(\"XXX Games\")": 126 "*": 0 # some older torrents's don't have a category - details: - selector: a.cellMainLink - attribute: href size: - selector: td:nth-child(2) + selector: td[data-title="Size"] + files: + selector: td[data-title="Files"] date: - selector: td:nth-child(3) + selector: td[data-title="Age"] filters: - name: dateparse - args: "02-01-2006 15:04:05 -07:00" + args: "2006-01-02 15:04:05" seeders: - selector: td:nth-child(4) + selector: td[data-title="Seed"] leechers: - selector: td:nth-child(5) + selector: td[data-title="Leech"] downloadvolumefactor: text: "0" uploadvolumefactor: diff --git a/src/Jackett.Common/Definitions/limetorrents.yml b/src/Jackett.Common/Definitions/limetorrents.yml index 923f2f27b..72c87a997 100644 --- a/src/Jackett.Common/Definitions/limetorrents.yml +++ b/src/Jackett.Common/Definitions/limetorrents.yml @@ -22,10 +22,18 @@ search: [q] 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: - 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: paths: diff --git a/src/Jackett.Common/Definitions/sktorrent.yml b/src/Jackett.Common/Definitions/sktorrent.yml index 3834b8825..48fc167bd 100644 --- a/src/Jackett.Common/Definitions/sktorrent.yml +++ b/src/Jackett.Common/Definitions/sktorrent.yml @@ -6,6 +6,8 @@ type: semi-private encoding: windows-1250 links: + - http://sktorrent.eu/ + legacylinks: - http://sktorrent.eu/torrent/ caps: @@ -46,7 +48,7 @@ movie-search: [q] login: - path: /torrent/login.php + path: torrent/login.php method: form form: form[action^="login.php?returnto=index.php"] inputs: @@ -55,11 +57,11 @@ error: - selector: font:contains("Incorrect") test: - path: /torrent/index.php + path: torrent/index.php search: paths: - - path: /torrent/torrents.php + - path: torrent/torrents.php inputs: search: "{{ .Keywords }}" category: "{{range .Categories}}{{.}};{{end}}" diff --git a/src/Jackett.Common/Definitions/speed-share.yml b/src/Jackett.Common/Definitions/speed-share.yml index e6a414d3b..c8b67e7a2 100644 --- a/src/Jackett.Common/Definitions/speed-share.yml +++ b/src/Jackett.Common/Definitions/speed-share.yml @@ -220,6 +220,11 @@ ,a[href^="torrents.php?cat=228"] ,a[href^="torrents.php?cat=191"] attribute: href + year: + selector: td.label > div:contains("Lançamento:") + filters: + - name: replace + args: ["Lançamento:", ""] title_anime: selector: a[href^="torrents-details.php?id="] filters: @@ -227,6 +232,9 @@ args: ["(Ep[\\.]?[ ]?)|([S]\\d\\d[Ee])", "E"] title_normal: 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: text: "{{if .Result.is_anime }}{{ .Result.title_anime }}{{else}}{{ .Result.title_normal }}{{end}}" filters: @@ -234,11 +242,16 @@ args: ["^(\\[XXX]\\s)", ""] - name: replace args: [" - NOVO!", ""] - title|append: - selector: td.label > div:contains("Lançamento:") - filters: - - name: replace - args: ["Lançamento:", ""] + - name: re_replace + args: ["(\\d{2})ª a (\\d{2})ª Temporada", "S$1-$2"] + - name: re_replace + args: ["(\\d{1})ª a (\\d{1})ª Temporada", "S0$1-0$2"] + - 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: optional: true selector: td.label > div:contains("Qualidade:") diff --git a/src/Jackett.Common/Definitions/torrentbd.yml b/src/Jackett.Common/Definitions/torrentbd.yml index 8053a7ac8..8119f460a 100644 --- a/src/Jackett.Common/Definitions/torrentbd.yml +++ b/src/Jackett.Common/Definitions/torrentbd.yml @@ -6,6 +6,8 @@ type: private encoding: UTF-8 links: + - http://www.torrentbd.com/ + legacylinks: - http://www.torrentbd.com/torrent caps: @@ -80,7 +82,7 @@ tv-search: [q, season, ep] login: - path: account-login.php + path: torrent/account-login.php method: form form: form[action="account-login.php"] inputs: @@ -89,11 +91,11 @@ error: - selector: div.myFrame:has(div.myF-caption > font.error) test: - path: torrents-search.php + path: torrent/torrents-search.php selector: div.myB-content:contains("Ratio:") ratio: - path: torrents-search.php + path: torrent/torrents-search.php selector: div.myB-content:contains("Ratio:") filters: - name: regexp @@ -101,7 +103,7 @@ search: paths: - - path: torrents-search.php + - path: torrent/torrents-search.php inputs: $raw: "{{range .Categories}}c{{.}}=1&{{end}}" search: "{{ .Query.Keywords }}" diff --git a/src/Jackett.Common/Indexers/BJShare.cs b/src/Jackett.Common/Indexers/BJShare.cs index cad341a04..c3e6e098f 100644 --- a/src/Jackett.Common/Indexers/BJShare.cs +++ b/src/Jackett.Common/Indexers/BJShare.cs @@ -238,20 +238,22 @@ Encoding = Encoding.UTF8; ICollection Category = null; string YearStr = null; Nullable YearPublishDate = null; + string CategoryStr = ""; if (Row.ClassList.Contains("group") || Row.ClassList.Contains("torrent")) // group/ungrouped headers { 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); + + 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 (CategoryStr == "14") { 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 { @@ -278,7 +280,11 @@ Encoding = Encoding.UTF8; if (Row.ClassList.Contains("group_torrent")) // torrents belonging to a group { release.Description = qDetailsLink.TextContent; - release.Title = GroupTitle + " " + GroupYearStr; + + string cleanTitle = Regex.Replace(GroupTitle, @" - S?(?\d{1,2})?E?(?\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.Category = GroupCategory; } @@ -286,7 +292,11 @@ Encoding = Encoding.UTF8; { var qDescription = Row.QuerySelector("div.torrent_info"); 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.Category = Category; }