mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 04:38:20 +00:00
parent
dcda239b3f
commit
9565469559
4 changed files with 29 additions and 39 deletions
|
@ -314,20 +314,6 @@
|
|||
args: ["Added ", ""]
|
||||
- name: replace
|
||||
args: ["on ", ""]
|
||||
- name: replace
|
||||
args: ["Monday", "Mon"]
|
||||
- name: replace
|
||||
args: ["Tuesday", "Tue"]
|
||||
- name: replace
|
||||
args: ["Wesnesday", "Wed"]
|
||||
- name: replace
|
||||
args: ["Thursday", "Thu"]
|
||||
- name: replace
|
||||
args: ["Friday", "Fri"]
|
||||
- name: replace
|
||||
args: ["Saturday", "Sat"]
|
||||
- name: replace
|
||||
args: ["Sunday", "Sun"]
|
||||
|
||||
fields:
|
||||
title:
|
||||
|
|
|
@ -159,22 +159,22 @@
|
|||
- name: replace
|
||||
args: ["Hoy en", "Today"]
|
||||
- name: replace
|
||||
args: ["Lunes a", "Monday"]
|
||||
args: ["Lunes a", "Monday at"]
|
||||
- name: replace
|
||||
args: ["Martes a", "Tuesday"]
|
||||
args: ["Martes a", "Tuesday at"]
|
||||
- name: replace
|
||||
args: ["Miércoles a", "Wednesday"]
|
||||
args: ["Miércoles a", "Wednesday at"]
|
||||
- name: replace
|
||||
args: ["Jueves a", "Thursday"]
|
||||
args: ["Jueves a", "Thursday at"]
|
||||
- name: replace
|
||||
args: ["Viernes a", "Friday"]
|
||||
args: ["Viernes a", "Friday at"]
|
||||
- name: replace # WTF?
|
||||
args: ["Friday a", "Friday"]
|
||||
args: ["Friday a", "Friday at"]
|
||||
- name: replace
|
||||
args: ["Sábado a", "Saturday"]
|
||||
args: ["Sábado a", "Saturday at"]
|
||||
- name: replace
|
||||
args: ["Domingo a", "Sunday"]
|
||||
- name: fuzzytime
|
||||
args: ["Domingo a", "Sunday at"]
|
||||
- name: fuzzytime # eg: Yesterday 14:22 or Monday at 14:22
|
||||
date:
|
||||
selector: td.torrent_name:contains("Uploaded"):contains("-"), .torrentOwner:contains("Uploaded"):contains("-")
|
||||
optional: true
|
||||
|
@ -190,8 +190,10 @@
|
|||
- name: regexp
|
||||
args: "(?<=Uploaded )(.*)(?= by)"
|
||||
- name: replace
|
||||
args: [" at ", " "]
|
||||
- name: fuzzytime
|
||||
args: ["Yesterday at", "Yesterday"]
|
||||
- name: replace
|
||||
args: ["Today at", "Today"]
|
||||
- name: fuzzytime # eg: Yesterday 14:22 or Monday at 14:22
|
||||
size:
|
||||
selector: td.size a, .torrentInfo a[rel="torrent_size"]
|
||||
grabs:
|
||||
|
|
|
@ -185,22 +185,22 @@
|
|||
- name: replace
|
||||
args: ["Hoy en", "Today"]
|
||||
- name: replace
|
||||
args: ["Lunes a", "Monday"]
|
||||
args: ["Lunes a", "Monday at"]
|
||||
- name: replace
|
||||
args: ["Martes a", "Tuesday"]
|
||||
args: ["Martes a", "Tuesday at"]
|
||||
- name: replace
|
||||
args: ["Miércoles a", "Wednesday"]
|
||||
args: ["Miércoles a", "Wednesday at"]
|
||||
- name: replace
|
||||
args: ["Jueves a", "Thursday"]
|
||||
args: ["Jueves a", "Thursday at"]
|
||||
- name: replace
|
||||
args: ["Viernes a", "Friday"]
|
||||
args: ["Viernes a", "Friday at"]
|
||||
- name: replace # WTF?
|
||||
args: ["Friday a", "Friday"]
|
||||
args: ["Friday a", "Friday at"]
|
||||
- name: replace
|
||||
args: ["Sábado a", "Saturday"]
|
||||
args: ["Sábado a", "Saturday at"]
|
||||
- name: replace
|
||||
args: ["Domingo a", "Sunday"]
|
||||
- name: fuzzytime
|
||||
args: ["Domingo a", "Sunday at"]
|
||||
- name: fuzzytime # eg: Yesterday 14:22 or Monday at 14:22
|
||||
date:
|
||||
selector: td.torrent_name:contains("Uploaded"):contains("-"), .torrentOwner:contains("Uploaded"):contains("-")
|
||||
optional: true
|
||||
|
@ -216,8 +216,10 @@
|
|||
- name: regexp
|
||||
args: "(?<=Uploaded )(.*)(?= by)"
|
||||
- name: replace
|
||||
args: [" at ", " "]
|
||||
- name: fuzzytime
|
||||
args: ["Yesterday at", "Yesterday"]
|
||||
- name: replace
|
||||
args: ["Today at", "Today"]
|
||||
- name: fuzzytime # eg: Yesterday 14:22 or Monday at 14:22
|
||||
size:
|
||||
selector: td.size a, .torrentInfo a[rel="torrent_size"]
|
||||
grabs:
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace Jackett.Common.Utils
|
|||
public static Regex todayRegexp = new Regex(@"(?i)\btoday([\s,]*|$)", RegexOptions.Compiled);
|
||||
public static Regex tomorrowRegexp = new Regex(@"(?i)\btomorrow([\s,]*|$)", RegexOptions.Compiled);
|
||||
public static Regex yesterdayRegexp = new Regex(@"(?i)\byesterday([\s,]*|$)", RegexOptions.Compiled);
|
||||
public static Regex daysOfWeekRegexp = new Regex(@"(?i)\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)([\s,]*|$)", RegexOptions.Compiled);
|
||||
public static Regex daysOfWeekRegexp = new Regex(@"(?i)\b(monday|tuesday|wednesday|thursday|friday|saturday|sunday)\s+at\s+", RegexOptions.Compiled);
|
||||
public static Regex missingYearRegexp = new Regex(@"^(\d{1,2}-\d{1,2})(\s|$)", RegexOptions.Compiled);
|
||||
public static Regex missingYearRegexp2 = new Regex(@"^(\d{1,2}\s+\w{3})\s+(\d{1,2}\:\d{1,2}.*)$", RegexOptions.Compiled); // 1 Jan 10:30
|
||||
|
||||
|
@ -178,7 +178,7 @@ namespace Jackett.Common.Utils
|
|||
return dt;
|
||||
}
|
||||
|
||||
// Days of the week ...
|
||||
// [day of the week] at ... (eg: Saturday at 14:22)
|
||||
match = daysOfWeekRegexp.Match(str);
|
||||
if (match.Success)
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ namespace Jackett.Common.Utils
|
|||
dt += ParseTimeSpan(time);
|
||||
|
||||
var dow = DayOfWeek.Monday;
|
||||
var groupMatchLower = match.Groups[0].Value.ToLower();
|
||||
var groupMatchLower = match.Groups[1].Value.ToLower();
|
||||
if (groupMatchLower.StartsWith("monday"))
|
||||
dow = DayOfWeek.Monday;
|
||||
else if (groupMatchLower.StartsWith("tuesday"))
|
||||
|
|
Loading…
Reference in a new issue