mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-02 08:34:32 +02:00
Merge branch 'master' of https://github.com/Jackett/Jackett
This commit is contained in:
@@ -70,6 +70,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
|
||||
* Metal Tracker
|
||||
* MVGroup Forum
|
||||
* MVGroup Main
|
||||
* Newstudio
|
||||
* NetHD
|
||||
* RuTracker
|
||||
* SkTorrent
|
||||
|
@@ -89,7 +89,7 @@
|
||||
- path: torrents-search.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Query.Keywords }}"
|
||||
search: "{{ .Keywords }}"
|
||||
incldead: "1"
|
||||
|
||||
rows:
|
||||
|
116
src/Jackett.Common/Definitions/newstudio.yml
Normal file
116
src/Jackett.Common/Definitions/newstudio.yml
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
site: newstudio
|
||||
name: Newstudio
|
||||
description: "Newstudio is a RUSSIAN Semi-Private site for TV"
|
||||
language: ru-ru
|
||||
type: semi-private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- http://newstudio.tv
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 6, cat: TV, desc: "TV series"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
|
||||
login:
|
||||
path: /login.php
|
||||
method: post
|
||||
inputs:
|
||||
login: 1
|
||||
login_username: "{{ .Config.username }}"
|
||||
login_password: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: div.alert-error
|
||||
test:
|
||||
path: "/"
|
||||
selector: a[href="/login.php?logout=1"]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: "/tracker.php?nm={{ .Keywords}}"
|
||||
- path: "/tracker.php?nm={{ .Keywords}}&start=50"
|
||||
- path: "/tracker.php?nm={{ .Keywords}}&start=100"
|
||||
- path: "/tracker.php?nm={{ .Keywords}}&start=150"
|
||||
rows:
|
||||
selector: table.well > tbody > tr:has(a[href^="./viewtopic.php?t="])
|
||||
filters:
|
||||
- name: andmatch
|
||||
fields:
|
||||
title:
|
||||
selector: a[href^="./viewtopic.php?t="] > b
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["\\b(\\d)\\b", "0$1"]
|
||||
- name: re_replace
|
||||
args: [".+Сезон\\s+(\\d+)(?:.+Серия\\s+(\\d+))*[\\s\\S]*\\/\\s+(.+)\\s+\\(\\d+\\)\\s+(\\S*)\\s*(\\w*\\d*).*", "$3 - S$1E$2 - rus $5 $4 newstudio"]
|
||||
- name: replace
|
||||
args: ["WEBDLRip","WEBDL"]
|
||||
- name: replace
|
||||
args: ["E -","E01-99 -"]
|
||||
details:
|
||||
selector: a[href^="./viewtopic.php?t="]
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^="./download.php?id="]
|
||||
attribute: href
|
||||
banner:
|
||||
selector: td:nth-child(3) > a > img
|
||||
attribute: src
|
||||
size:
|
||||
selector: td:nth-child(5) > a
|
||||
category:
|
||||
# add category for Sonarr
|
||||
text: 6
|
||||
date:
|
||||
# 16-Nov-17, Today 01:34
|
||||
# 16-Ноя-17, Сегодня 12:34
|
||||
# 15-Nov-17, Yesterday 17:20
|
||||
# 15-Ноя-17, Вчера 12:40
|
||||
# 4-Nov-17, 23:50
|
||||
# 14-Ноя-17, 06:11
|
||||
selector: td:nth-child(6)
|
||||
filters:
|
||||
# replace white spaces
|
||||
- name: re_replace
|
||||
args: ["(Сегодня|Вчера|\\s|,|-)+", " "]
|
||||
- name: re_replace
|
||||
args: ["(Today|Yesterday|\\s|,|-)+", " "]
|
||||
# replace month abbreviations
|
||||
- name: replace
|
||||
args: ["Янв", "Jan"]
|
||||
- name: replace
|
||||
args: ["Фев", "Feb"]
|
||||
- name: replace
|
||||
args: ["Мар", "Mar"]
|
||||
- name: replace
|
||||
args: ["Апр", "Apr"]
|
||||
- name: replace
|
||||
args: ["Май", "May"]
|
||||
- name: replace
|
||||
args: ["Июн", "Jun"]
|
||||
- name: replace
|
||||
args: ["Июл", "Jul"]
|
||||
- name: replace
|
||||
args: ["Авг", "Aug"]
|
||||
- name: replace
|
||||
args: ["Сен", "Sep"]
|
||||
- name: replace
|
||||
args: ["Окт", "Oct"]
|
||||
- name: replace
|
||||
args: ["Ноя", "Nov"]
|
||||
- name: replace
|
||||
args: ["Дек", "Dec"]
|
||||
- name: append
|
||||
args: ":00 +05:00"
|
||||
- name: dateparse
|
||||
args: "2 Jan 06 15:04:05 -07:00"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
img[src="images/tor_gold.gif"]: "0"
|
||||
"*": "1"
|
||||
uploadvolumefactor:
|
||||
text: "1"
|
@@ -11,28 +11,12 @@
|
||||
caps:
|
||||
# unfortunately RuTor does not display categories anywhere in its search results page :-(
|
||||
# albeit you can select a single category in its search options
|
||||
# so I've opted not to support categories, and default all results with category=Other.
|
||||
# so I've opted not to support categories
|
||||
categorymappings:
|
||||
# - {id: 1, cat: Movies/Foreign, desc: "Foreign films"}
|
||||
# - {id: 2, cat: Audio, desc: "Music"}
|
||||
- {id: 3, cat: Other, desc: "Other"}
|
||||
# - {id: 4, cat: TV, desc: "TV Shows"}
|
||||
# - {id: 5, cat: Movies, desc: "Russian films"}
|
||||
# - {id: 6, cat: TV, desc: "TV"}
|
||||
# - {id: 7, cat: Movies, desc: "Animation"}
|
||||
# - {id: 8, cat: PC/Games, desc: "Games"}
|
||||
# - {id: 9, cat: PC/0day, desc: "Software"}
|
||||
# - {id: 10, cat: TV/Anime, desc: "Anime"}
|
||||
# - {id: 11, cat: Books, desc: "Books"}
|
||||
# - {id: 12, cat: Movies, desc: "Popular films"}
|
||||
# - {id: 13, cat: TV/Sport, desc: "Sports and Health"}
|
||||
# - {id: 14, cat: Books, desc: "Household"}
|
||||
# - {id: 15, cat: TV, desc: "Humor"}
|
||||
- {id: 4, cat: TV, desc: "TV Shows"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
# tv-search: [q, season, ep]
|
||||
# movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: method
|
||||
@@ -51,18 +35,22 @@
|
||||
search:
|
||||
paths:
|
||||
# http://rutor.info/search/0/0/000/0/gotham%2004x01
|
||||
- path: "{{ if .Keywords }}search/0/0/{{ .Config.method }}00/0/{{ .Keywords }}{{else}}top{{end}}"
|
||||
- path: "{{ if .Query.Q }}search/0/0/{{ .Config.method }}00/0/{{ .Query.Q }}{{else}}top{{end}}"
|
||||
rows:
|
||||
selector: table > tbody > tr:has(td:has(a.downgif))
|
||||
fields:
|
||||
title:
|
||||
selector: td:nth-of-type(2) a:nth-of-type(3)
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: [".+\\/\\s([^а-яА-я\\/]+)\\s.*\\[(?:S*(\\d+))(?:x*(\\d+-*\\d*).*)*\\].*\\)\\s+(.+)\\s+(?:\\||от)\\s*(.+)","$1 - S$2E$3 - rus - $4 - $5"]
|
||||
- name: replace
|
||||
args: ["E -", "E01-99 -"]
|
||||
- name: replace
|
||||
args: ["Кураж-Бамбей", "kurazh"]
|
||||
details:
|
||||
selector: td:nth-of-type(2) a:nth-of-type(3)
|
||||
attribute: href
|
||||
category:
|
||||
# Category=Other
|
||||
text: "3"
|
||||
download:
|
||||
selector: td:nth-of-type(2) a:nth-of-type(1)
|
||||
attribute: href
|
||||
@@ -105,7 +93,7 @@
|
||||
- name: append
|
||||
args: " 00:00:00 +03:00"
|
||||
- name: dateparse
|
||||
args: "02 Jan 06 15:04:15 -07:00"
|
||||
args: "02 Jan 06 15:04:05 -07:00"
|
||||
# some results don't have comments which throws off td count. So we go fishing for the following fields
|
||||
size:
|
||||
optional: true
|
||||
|
@@ -11,6 +11,7 @@ using Jackett.Utils;
|
||||
using Jackett.Utils.Clients;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Jackett.Indexers
|
||||
{
|
||||
@@ -1498,7 +1499,7 @@ namespace Jackett.Indexers
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var searchString = query.GetQueryString();
|
||||
var searchString = query.SanitizedSearchTerm;
|
||||
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
||||
@@ -1510,6 +1511,10 @@ namespace Jackett.Indexers
|
||||
else // use the normal search
|
||||
{
|
||||
searchString = searchString.Replace("-", " ");
|
||||
if (query.Season != 0)
|
||||
{
|
||||
searchString += " Сезон: " + query.Season;
|
||||
}
|
||||
queryCollection.Add("nm", searchString);
|
||||
}
|
||||
|
||||
@@ -1545,6 +1550,7 @@ namespace Jackett.Indexers
|
||||
var qSize = Row.QuerySelector("td.tor-size > u");
|
||||
|
||||
release.Title = qDetailsLink.TextContent;
|
||||
|
||||
release.Comments = new Uri(SiteLink + "forum/" + qDetailsLink.GetAttribute("href"));
|
||||
release.Link = new Uri(SiteLink + "forum/" + qDownloadLink.GetAttribute("href"));
|
||||
release.Guid = release.Comments;
|
||||
@@ -1567,6 +1573,21 @@ namespace Jackett.Indexers
|
||||
release.DownloadVolumeFactor = 1;
|
||||
release.UploadVolumeFactor = 1;
|
||||
|
||||
if (release.Category.Contains(TorznabCatType.TV.ID))
|
||||
{
|
||||
// extract season and episodes
|
||||
var regex = new Regex(".+\\/\\s([^а-яА-я\\/]+)\\s\\/.+Сезон\\s*[:]*\\s+(\\d+).+(?:Серии|Эпизод)+\\s*[:]*\\s+(\\d+-*\\d*).+,\\s+(.+)\\].+(\\(.+\\)).*");
|
||||
|
||||
var title = regex.Replace(release.Title, "$1 - S$2E$3 - rus $4 $5");
|
||||
title = Regex.Replace(title, "-Rip", "Rip", RegexOptions.IgnoreCase);
|
||||
title = Regex.Replace(title, "WEB-DLRip", "WEBDL", RegexOptions.IgnoreCase);
|
||||
title = Regex.Replace(title, "WEB-DL", "WEBDL", RegexOptions.IgnoreCase);
|
||||
title = Regex.Replace(title, "HDTVRip", "HDTV", RegexOptions.IgnoreCase);
|
||||
title = Regex.Replace(title, "Кураж-Бамбей", "kurazh", RegexOptions.IgnoreCase);
|
||||
|
||||
release.Title = title;
|
||||
}
|
||||
|
||||
releases.Add(release);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Reference in New Issue
Block a user