mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-12 23:14:08 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a89246c9a7 | ||
![]() |
69b01c34f8 | ||
![]() |
a41bf6ebe4 | ||
![]() |
5bf224d84d | ||
![]() |
03af2a6d1d | ||
![]() |
aee7bba3ce |
@@ -81,11 +81,16 @@
|
||||
|
||||
search:
|
||||
paths:
|
||||
# http://estone.cc/letoltes.php?kereses_nev=wide&miben=0&cimke=&cat=0&submit.x=40&submit.y=9
|
||||
- path: letoltes.php
|
||||
method: get
|
||||
inputs:
|
||||
$raw: "{{ range .Categories }}kat[]={{.}}&{{end}}{{ .Config.sort }}={{ .Config.type }}"
|
||||
kereses_nev: "{{ .Keywords }}"
|
||||
# 0 name 1 performer 2 director
|
||||
miben: 0
|
||||
# genre
|
||||
cimke: ""
|
||||
# does not support imdbid search and does not return imdb link in results
|
||||
|
||||
rows:
|
||||
selector: body > div[id^="torrent_"]
|
||||
|
@@ -23,9 +23,9 @@
|
||||
- {id: 13, cat: XXX, desc: "XXX"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
search: [q, imdbid]
|
||||
tv-search: [q, season, ep, imdbid]
|
||||
movie-search: [q, imdbid]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
@@ -69,13 +69,14 @@
|
||||
test:
|
||||
path: browse.php
|
||||
selector: a[href^="logout.php"]
|
||||
|
||||
|
||||
search:
|
||||
paths:
|
||||
# https://polishsource.cz/browse.php?search=tt1598778&incldead=1&scene=0&pl=0&sub=&search_in=nfo
|
||||
- path: browse.php
|
||||
inputs:
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
|
||||
# 0 onlyactive 1 all 2 onlydead
|
||||
incldead: 1
|
||||
# 0 all 1 scene 2 notscene 3 internal
|
||||
@@ -85,7 +86,7 @@
|
||||
# subcat blank=all
|
||||
sub: ""
|
||||
# title both nfo
|
||||
search_in: title
|
||||
search_in: "{{ if .Query.IMDBID }}nfo{{else}}title{{end}}"
|
||||
sort: "{{ .Config.sort }}"
|
||||
type: "{{ .Config.type }}"
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
legacylinks:
|
||||
- https://torrent-turk.org/
|
||||
- https://torrent-turk.co/
|
||||
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 149, cat: Movies, desc: "Movies/Turkish"}
|
||||
@@ -27,7 +27,7 @@
|
||||
- {id: 161, cat: Movies/DVD, desc: "Movies/Foreign/DVD5-DVD9"}
|
||||
- {id: 162, cat: Movies/WEBDL, desc: "Movies/Foreign/BRRip-HDRip-DVDRip-WebDL"}
|
||||
- {id: 163, cat: Movies/Other, desc: "Movies/Foreign/Boxset"}
|
||||
|
||||
|
||||
- {id: 164, cat: TV, desc: "TV"}
|
||||
- {id: 165, cat: TV, desc: "TV/Turkish"}
|
||||
- {id: 166, cat: TV, desc: "TV/Foreign"}
|
||||
@@ -35,7 +35,7 @@
|
||||
- {id: 185, cat: TV/Documentary, desc: "TV/Documentary"}
|
||||
- {id: 168, cat: TV/Other, desc: "TV/Other"}
|
||||
- {id: 169, cat: TV/Other, desc: "TV/Boxset"}
|
||||
|
||||
|
||||
- {id: 191, cat: TV, desc: "TV/BluTv"}
|
||||
- {id: 192, cat: TV, desc: "TV/BluTv Series"}
|
||||
- {id: 193, cat: Movies, desc: "TV/BluTv Film"}
|
||||
@@ -57,12 +57,12 @@
|
||||
- {id: 179, cat: PC, desc: "OS"}
|
||||
- {id: 180, cat: PC/Games, desc: "PC/Games"}
|
||||
- {id: 181, cat: Console, desc: "Playstation"}
|
||||
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
movie-search: [q]
|
||||
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
type: text
|
||||
@@ -89,7 +89,11 @@
|
||||
options:
|
||||
"desc": "desc"
|
||||
"asc": "asc"
|
||||
|
||||
- name: info_results
|
||||
type: info
|
||||
label: Search results
|
||||
default: "If you are getting the error: <b>An error has occured!You can't view this page unless you read all your unread messages</b>, then access the site with your browser and <b>mark as read</b> all PMs."
|
||||
|
||||
login:
|
||||
path: ?p=home&pid=1
|
||||
method: form
|
||||
@@ -111,11 +115,11 @@
|
||||
test:
|
||||
path: ?p=torrents&type=bookmarks&pid=508
|
||||
selector: a#logout
|
||||
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: /
|
||||
keywordsfilters:
|
||||
keywordsfilters:
|
||||
- name: re_replace
|
||||
args: ["[^a-zA-Z0-9]+", "%25"]
|
||||
inputs:
|
||||
@@ -129,6 +133,7 @@
|
||||
"sortOptions[sortOrder]": "{{ .Config.type }}"
|
||||
error:
|
||||
- selector: div.error:not(:contains("Hiçbir sonuç bulunamadı."))
|
||||
# does not support imdbid search and does not return imdb link in results.
|
||||
|
||||
rows:
|
||||
selector: table#torrents_table_classic > tbody > tr:has(td.torrent_name)
|
||||
@@ -150,7 +155,7 @@
|
||||
attribute: href
|
||||
date:
|
||||
optional: true
|
||||
# Uploaded 30-01-2019 15:02 by
|
||||
# Uploaded 30-01-2019 15:02 by
|
||||
selector: td.torrent_name:not(:contains(" at "))
|
||||
filters:
|
||||
- name: regexp
|
||||
|
@@ -7,11 +7,12 @@
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
links:
|
||||
- https://torrentview5.net/
|
||||
- https://torrentview6.net/
|
||||
legacylinks:
|
||||
- https://torrentview.net/
|
||||
- https://torrentview3.net/
|
||||
- https://torrentview4.net/
|
||||
- https://torrentview5.net/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
|
@@ -422,7 +422,7 @@ namespace Jackett.Common.Indexers
|
||||
|
||||
// Building our tracker query
|
||||
parameters.Add("incldead", "1");
|
||||
parameters.Add("fullsearch", "0");
|
||||
parameters.Add("fullsearch", ConfigData.UseFullSearch.Value ? "1" : "0");
|
||||
parameters.Add("scenerelease", "0");
|
||||
|
||||
// If search term provided
|
||||
|
@@ -7,6 +7,7 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
|
||||
public StringItem Password { get; private set; }
|
||||
public DisplayItem PagesWarning { get; private set; }
|
||||
public StringItem Pages { get; private set; }
|
||||
public BoolItem UseFullSearch { get; private set; }
|
||||
public DisplayItem SecurityWarning { get; private set; }
|
||||
public BoolItem Latency { get; private set; }
|
||||
public BoolItem Browser { get; private set; }
|
||||
@@ -31,6 +32,7 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
|
||||
Password = new StringItem { Name = "Password", Value = "" };
|
||||
PagesWarning = new DisplayItem("<b>Preferences Configuration</b> (<i>Tweak your search settings</i>),<br /><br /> <ul><li><b>Max Pages to Process</b> let you specify how many page (max) Jackett can process when doing a search. Setting a value <b>higher than 4 is dangerous</b> for you account ! (<b>Result of too many requests to tracker...that <u>will be suspect</u></b>).</li></ul>") { Name = "Preferences" };
|
||||
Pages = new StringItem { Name = "Max Pages to Process (Required)", Value = "4" };
|
||||
UseFullSearch = new BoolItem { Name = "Enable search in description.", Value = false };
|
||||
SecurityWarning = new DisplayItem("<b>Security Configuration</b> (<i>Read this area carefully !</i>),<br /><br /> <ul><li><b>Latency Simulation</b> will simulate human browsing with Jacket by pausing Jacket for an random time between each request, to fake a real content browsing.</li><li><b>Browser Simulation</b> will simulate a real human browser by injecting additionals headers when doing requests to tracker.<b>You must enable it to use this provider!</b></li></ul>") { Name = "Security" };
|
||||
Latency = new BoolItem() { Name = "Latency Simulation (Optional)", Value = false };
|
||||
Browser = new BoolItem() { Name = "Browser Simulation (Forced)", Value = true };
|
||||
|
@@ -9,9 +9,9 @@ namespace Jackett.Common.Utils
|
||||
public const string Rfc1123ZPattern = "ddd, dd MMM yyyy HH':'mm':'ss z";
|
||||
|
||||
private static readonly Regex _TimeAgoRegexp = new Regex(@"(?i)\bago", RegexOptions.Compiled);
|
||||
private static readonly Regex _TodayRegexp = new Regex(@"(?i)\btoday([\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _TomorrowRegexp = new Regex(@"(?i)\btomorrow([\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _YesterdayRegexp = new Regex(@"(?i)\byesterday([\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _TodayRegexp = new Regex(@"(?i)\btoday(?:[\s,]+(?:at){0,1}\s*|[\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _TomorrowRegexp = new Regex(@"(?i)\btomorrow(?:[\s,]+(?:at){0,1}\s*|[\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _YesterdayRegexp = new Regex(@"(?i)\byesterday(?:[\s,]+(?:at){0,1}\s*|[\s,]*|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _DaysOfWeekRegexp = new Regex(@"(?i)\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)\s+at\s+", RegexOptions.Compiled);
|
||||
private static readonly Regex _MissingYearRegexp = new Regex(@"^(\d{1,2}-\d{1,2})(\s|$)", RegexOptions.Compiled);
|
||||
private static readonly Regex _MissingYearRegexp2 = new Regex(@"^(\d{1,2}\s+\w{3})\s+(\d{1,2}\:\d{1,2}.*)$", RegexOptions.Compiled); // 1 Jan 10:30
|
||||
@@ -287,28 +287,9 @@ namespace Jackett.Common.Utils
|
||||
}
|
||||
}
|
||||
|
||||
private static TimeSpan ParseTimeSpan(string time)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(time))
|
||||
return TimeSpan.Zero;
|
||||
|
||||
var offset = TimeSpan.Zero;
|
||||
if (time.EndsWith("AM"))
|
||||
{
|
||||
time = time.Substring(0, time.Length - 2);
|
||||
if (time.StartsWith("12")) // 12:15 AM becomes 00:15
|
||||
time = "00" + time.Substring(2);
|
||||
}
|
||||
else if (time.EndsWith("PM"))
|
||||
{
|
||||
time = time.Substring(0, time.Length - 2);
|
||||
offset = TimeSpan.FromHours(12);
|
||||
}
|
||||
|
||||
var ts = TimeSpan.Parse(time);
|
||||
ts += offset;
|
||||
return ts;
|
||||
}
|
||||
|
||||
private static TimeSpan ParseTimeSpan(string time) =>
|
||||
string.IsNullOrWhiteSpace(time)
|
||||
? TimeSpan.Zero
|
||||
: DateTime.Parse(time).TimeOfDay;
|
||||
}
|
||||
}
|
||||
|
31
src/Jackett.Test/Utils/DateTimeUtilTests.cs
Normal file
31
src/Jackett.Test/Utils/DateTimeUtilTests.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Jackett.Common.Utils.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class DateTimeUtilTests
|
||||
{
|
||||
[Test]
|
||||
public void FromUnknownTest()
|
||||
{
|
||||
var today = DateTime.UtcNow.Date;
|
||||
var yesterday = today.AddDays(-1);
|
||||
var tomorrow = today.AddDays(1);
|
||||
var testCases = new Dictionary<string, DateTime>
|
||||
{
|
||||
{"today, at 1:00 PM", today.AddHours(13)},
|
||||
{"today at 12:00PM", today.AddHours(12)},
|
||||
{"Today", today},
|
||||
{"Today at 20:19:54", today.AddHours(20).AddMinutes(19).AddSeconds(54)},
|
||||
{"Today 22:29", today.AddHours(22).AddMinutes(29)},
|
||||
{"Yesterday\n 19:54:54", yesterday.AddHours(19).AddMinutes(54).AddSeconds(54)},
|
||||
{"Yesterday\n 11:55 PM", yesterday.AddHours(23).AddMinutes(55)}
|
||||
};
|
||||
|
||||
foreach (var testCase in testCases)
|
||||
Assert.AreEqual( testCase.Value, DateTimeUtil.FromUnknown(testCase.Key));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user