mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-22 14:16:59 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a89246c9a7 | ||
|
|
69b01c34f8 | ||
|
|
a41bf6ebe4 | ||
|
|
5bf224d84d | ||
|
|
03af2a6d1d | ||
|
|
aee7bba3ce | ||
|
|
29b1304967 | ||
|
|
81029b3019 | ||
|
|
62caeb3f4d | ||
|
|
fba3e1922f | ||
|
|
0aacf6344d | ||
|
|
9d3d8ea18d | ||
|
|
4da3921e21 | ||
|
|
fed41d5b68 | ||
|
|
15841e26a8 |
@@ -31,9 +31,9 @@
|
||||
- {id: 21, cat: Books, desc: "Book"}
|
||||
|
||||
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: cookie
|
||||
@@ -67,17 +67,19 @@
|
||||
test:
|
||||
path: index.php
|
||||
selector: a[href^="/logout.php"]
|
||||
|
||||
|
||||
search:
|
||||
paths:
|
||||
- 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 4 requests 5 onlydead 6 polish 8 free 10 doubleup 11 premier 13 VOD
|
||||
incldead: 1
|
||||
# 0 title 1 descr
|
||||
blah: 0
|
||||
blah: "{{ if .Query.IMDBID }}1{{else}}0{{end}}"
|
||||
gatunek: 0
|
||||
quality: none
|
||||
sort: "{{ .Config.sort }}"
|
||||
type: "{{ .Config.type }}"
|
||||
|
||||
@@ -98,13 +100,17 @@
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href^="download.php/"]
|
||||
attribute: href
|
||||
attribute: href
|
||||
banner:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "src=(.+?) "
|
||||
imdb:
|
||||
optional: true
|
||||
selector: a[href*="www.imdb.com/title/tt"]
|
||||
attribute: href
|
||||
description:
|
||||
optional: true
|
||||
selector: img[src="pic/Poland.png"]
|
||||
|
||||
@@ -12,20 +12,21 @@
|
||||
categorymappings:
|
||||
# Documentaire
|
||||
- {id: 96, cat: TV/Documentary, desc: "Docus TV"}
|
||||
- {id: 124, cat: TV/Documentary, desc: "Docus Formation Video"}
|
||||
# Films
|
||||
- {id: 49, cat: Movies/3D, desc: "Films 3D"}
|
||||
- {id: 1, cat: XXX, desc: "3X"}
|
||||
- {id: 48, cat: XXX, desc: "3X HD1080p"}
|
||||
- {id: 47, cat: XXX, desc: "3X HD720p"}
|
||||
- {id: 50, cat: Movies/UHD, desc: "Films 4K"}
|
||||
- {id: 51, cat: Movies/UHD, desc: "Films 4K UHDTV"}
|
||||
- {id: 51, cat: TV/UHD, desc: "Films 4K UHDTV"}
|
||||
- {id: 57, cat: Movies/BluRay, desc: "Films BDRip"}
|
||||
- {id: 56, cat: Movies/BluRay, desc: "Films Blu-Ray"}
|
||||
- {id: 58, cat: Movies/BluRay, desc: "Films BRRip"}
|
||||
- {id: 66, cat: Movies, desc: "Films CamTS"}
|
||||
- {id: 59, cat: Movies/DVD, desc: "Films DVDR"}
|
||||
- {id: 60, cat: Movies/DVD, desc: "Films DVDRip"}
|
||||
- {id: 98, cat: Movies, desc: "Films Film Animées"}
|
||||
- {id: 98, cat: TV/Anime, desc: "Films Film Animées"}
|
||||
- {id: 65, cat: Movies, desc: "Films FSCR"}
|
||||
- {id: 52, cat: Movies/HD, desc: "Films HD 720p"}
|
||||
- {id: 53, cat: Movies/HD, desc: "Films HD1080p"}
|
||||
@@ -124,7 +125,7 @@
|
||||
options:
|
||||
"desc": "desc"
|
||||
"asc": "asc"
|
||||
|
||||
|
||||
login:
|
||||
method: cookie
|
||||
inputs:
|
||||
@@ -149,13 +150,17 @@
|
||||
# http://crazyspirits.com/torrents-search.php?c101=1&c102=1&c103=1&c104=1&c105=1&c106=1&search=&cat=0&incldead=0&freeleech=0&lang=0
|
||||
- path: torrents-search.php
|
||||
inputs:
|
||||
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
# 0 active 1 incldead 2 onlydead
|
||||
incldead: 1
|
||||
# 0 all 1 inclfree 2 onlyfree
|
||||
freeleech: 0
|
||||
# 0 all 1 french 2 english etc
|
||||
lang: 0
|
||||
sort: "{{ .Config.sort }}"
|
||||
order: "{{ .Config.type }}"
|
||||
# imdb search not supported and imdb links not in results.
|
||||
|
||||
rows:
|
||||
selector: table.border_table > tbody > tr.t-row
|
||||
@@ -192,13 +197,13 @@
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: "Taille : </b>(.*?)<br"
|
||||
args: "Taille : </b>(.*?)<br"
|
||||
date:
|
||||
selector: a[onmouseover][href^="torrents-details.php?id="]
|
||||
attribute: onmouseover
|
||||
filters:
|
||||
- name: regexp
|
||||
args: " Le : </b>(.*?)<br"
|
||||
args: " Le : </b>(.*?)<br"
|
||||
- name: dateparse
|
||||
args: "02-01-2006"
|
||||
downloadvolumefactor:
|
||||
@@ -206,6 +211,5 @@
|
||||
img[src="images/Torrents/free.png"]: 0
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"*": 1
|
||||
text: 1
|
||||
# TT3.0
|
||||
|
||||
@@ -100,15 +100,17 @@
|
||||
search:
|
||||
paths:
|
||||
# http://www.crnaberza.com/browse.php?c52=1&c20=1&c34=1&incldead=1&search=star+trek
|
||||
- path: browse.php
|
||||
- path: browse.php
|
||||
inputs:
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
searchin: title
|
||||
# 0 title 1 descr 2 both
|
||||
blah: 0
|
||||
# 0 active 1 incldead 2 onlydead
|
||||
incldead: 1
|
||||
sort: "{{ .Config.sort }}"
|
||||
type: "{{ .Config.type }}"
|
||||
# does not support searching imdbid and does not return imdb links
|
||||
|
||||
rows:
|
||||
selector: tr:has(td.trowtorrent)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
- {id: 38, cat: Movies/HD, desc: "HD-LQ"}
|
||||
- {id: 3, cat: PC/Games, desc: "Hry"}
|
||||
- {id: 2, cat: Audio, desc: "Hudba"}
|
||||
- {id: 34, cat: Audio/Video, desc: "Hudba DVD/HD"}
|
||||
- {id: 34, cat: Audio/Video, desc: "Hudební video"}
|
||||
- {id: 6, cat: Books, desc: "Knihy"}
|
||||
- {id: 13, cat: Console, desc: "Konzole"}
|
||||
- {id: 32, cat: Audio, desc: "Mluvené slovo"}
|
||||
@@ -30,7 +30,6 @@
|
||||
- {id: 4, cat: Other, desc: "Ostatní"}
|
||||
- {id: 25, cat: TV, desc: "Seriály"}
|
||||
- {id: 29, cat: Audio, desc: "Soundtrack"}
|
||||
- {id: 19, cat: Audio/Video, desc: "Videoklipy"}
|
||||
- {id: 24, cat: XXX, desc: "xXx"}
|
||||
|
||||
modes:
|
||||
@@ -74,12 +73,14 @@
|
||||
inputs:
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
s: "{{ .Keywords }}"
|
||||
# 0 approved 1 all 2 not approved
|
||||
t: 1
|
||||
o: "{{ .Config.sort }}"
|
||||
# does not support imdbid search and does not return imdb links
|
||||
|
||||
rows:
|
||||
selector: tr.torr_hover
|
||||
|
||||
|
||||
keywordsfilters:
|
||||
- name: re_replace
|
||||
args: ["S[0-9]{2}([^E]|$)", ""] # remove season tag without episode (search doesn't support it)
|
||||
@@ -93,17 +94,17 @@
|
||||
- name: diacritics
|
||||
args: replace
|
||||
- name: replace
|
||||
args: ["1080i", "1080p"]
|
||||
args: ["1080i", "1080p"]
|
||||
- name: replace
|
||||
args: ["720i", "720p"]
|
||||
args: ["720i", "720p"]
|
||||
- name: replace
|
||||
args: ["pLQ", "p"]
|
||||
args: ["pLQ", "p"]
|
||||
- name: replace
|
||||
args: ["pHD", "p"]
|
||||
args: ["pHD", "p"]
|
||||
- name: replace
|
||||
args: ["serie", ""]
|
||||
args: ["serie", ""]
|
||||
- name: replace
|
||||
args: ["Serie", ""]
|
||||
args: ["Serie", ""]
|
||||
- name: re_replace
|
||||
args: ["(\\d{2})\\.", "S$1"]
|
||||
- name: re_replace
|
||||
@@ -152,7 +153,7 @@
|
||||
args: [ "|", 2 ]
|
||||
- name: append
|
||||
args: " +02:00"
|
||||
- name: dateparse
|
||||
- name: dateparse
|
||||
args: "2.1.2006 15:04 -07:00"
|
||||
seeders:
|
||||
selector: td:nth-child(7) span
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
- {id: 8, cat: TV, desc: "TV shows"}
|
||||
|
||||
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,10 +69,14 @@
|
||||
- path: browse.php
|
||||
inputs:
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
|
||||
# active 1 incldead 2 onlydead
|
||||
incldead: 1
|
||||
# 1 = look in description
|
||||
Lysing: "{{ if .Query.IMDBID }}1{{else}}{{end}}"
|
||||
sort: "{{ .Config.sort }}"
|
||||
type: "{{ .Config.type }}"
|
||||
# does not return imdb links
|
||||
|
||||
rows:
|
||||
selector: table[class="torrentlist"] > tbody > tr:has(a[href*="details.php?id="])
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
categorymappings:
|
||||
- {id: 60, cat: Movies/HD, desc: "MicroHD 720p"}
|
||||
- {id: 77, cat: Movies/HD, desc: "MicroHD 1080p"}
|
||||
- {id: 78, cat: Movies/HD, desc: "MicroHD 4k"}
|
||||
- {id: 78, cat: Movies/HD, desc: "MicroHD 4K"}
|
||||
- {id: 64, cat: TV/HD, desc: "Pack Series"}
|
||||
- {id: 65, cat: TV/HD, desc: "Pack Series VOSE"}
|
||||
- {id: 80, cat: Movies/BluRay, desc: "BDRip X265 1080p"}
|
||||
@@ -43,13 +43,13 @@
|
||||
- {id: 48, cat: Movies/BluRay, desc: "BR-Rip/HD-Rip"}
|
||||
- {id: 17, cat: Movies/BluRay, desc: "BD-Rip"}
|
||||
- {id: 5, cat: TV/Anime, desc: "Anime"}
|
||||
- {id: 34, cat: PC/Games, desc: "Juegos Pc"}
|
||||
- {id: 7, cat: PC/0day, desc: "Software Pc"}
|
||||
- {id: 34, cat: PC/Games, desc: "Juegos PC"}
|
||||
- {id: 7, cat: PC/0day, desc: "Software PC"}
|
||||
- {id: 35, cat: Console, desc: "Juegos Sony"}
|
||||
- {id: 36, cat: PC/Games, desc: "Juegos Microsoft"}
|
||||
- {id: 37, cat: Console/NDS, desc: "Juegos Nintendo"}
|
||||
- {id: 45, cat: Audio/MP3, desc: "Music MP3"}
|
||||
- {id: 44, cat: Audio/Lossless, desc: "Music flac"}
|
||||
- {id: 44, cat: Audio/Lossless, desc: "Music FLAC"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
@@ -84,7 +84,7 @@
|
||||
type: info
|
||||
label: Results Per Page
|
||||
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
|
||||
|
||||
|
||||
login:
|
||||
method: cookie
|
||||
inputs:
|
||||
@@ -99,11 +99,14 @@
|
||||
inputs:
|
||||
page: "torrents"
|
||||
category: "{{ range .Categories }}{{.}};{{end}}"
|
||||
search: "{{ if .Keywords }}{{ .Keywords }}{{else}}{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
# 0 all 1 activeonly 2 deadonly
|
||||
active: 0
|
||||
# 0 title 1 title&desc 2 descr 3 uploaders 5 gold 6 silver 9 2x 10 3x 11 4x
|
||||
options: 0
|
||||
order: "{{ .Config.sort }}"
|
||||
by: "{{ .Config.type }}"
|
||||
# does not support imdbid search and does not supply imdb link in results.
|
||||
|
||||
rows:
|
||||
selector: table.table.table-bordered > tbody > tr:has(a[href^="download.php?id="])
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep]
|
||||
tv-search: [q]
|
||||
movie-search: [q]
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
@@ -125,11 +126,15 @@
|
||||
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
|
||||
search: "{{ .Keywords }}"
|
||||
cat: 0
|
||||
# 0 active 1 incldead 2 onlydead
|
||||
incldead: 1
|
||||
# 0 all 1 notfree 2 onlyfree
|
||||
freeleech: 0
|
||||
# 0 all 1 english 2 french etc
|
||||
lang: 0
|
||||
sort: "{{ .Config.sort }}"
|
||||
order: "{{ .Config.type }}"
|
||||
# does not support imdbid search and does not return imdb link in results
|
||||
|
||||
rows:
|
||||
selector: table.ttable_headinner tr.t-row
|
||||
|
||||
@@ -198,11 +198,13 @@
|
||||
page: torrents
|
||||
search: "{{ .Keywords }}"
|
||||
category: "{{ range .Categories }}{{.}};{{end}}"
|
||||
# 0 title 1 title&descr 2 descr
|
||||
options: 0
|
||||
active: "{{ .Config.active }}"
|
||||
gold: "{{ .Config.gold }}"
|
||||
order: "{{ .Config.sort }}"
|
||||
by: "{{ .Config.type }}"
|
||||
# does not support imdbid search and does not ruturn imdb link in results
|
||||
|
||||
rows:
|
||||
selector: table > tbody > tr > td > table.lista > tbody > tr:has(td[onmouseover="this.className='post'"])
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Jackett.Common.Indexers
|
||||
public class EpubLibre : BaseWebIndexer
|
||||
{
|
||||
private string SearchUrl => SiteLink + "catalogo/index/{0}/nuevo/todos/sin/todos/{1}/ajax";
|
||||
private string SobrecargaUrl => SiteLink + "inicio/sobrecarga";
|
||||
private const int MaxItemsPerPage = 18;
|
||||
private const int MaxSearchPageLimit = 6; // 18 items per page * 6 pages = 108
|
||||
private readonly Dictionary<string, string> _apiHeaders = new Dictionary<string, string>
|
||||
@@ -149,6 +150,8 @@ namespace Jackett.Common.Indexers
|
||||
public override async Task<byte[]> Download(Uri link)
|
||||
{
|
||||
var result = await RequestStringWithCookies(link.AbsoluteUri);
|
||||
if (SobrecargaUrl.Equals(result.RedirectingTo))
|
||||
throw new Exception("El servidor se encuentra sobrecargado en estos momentos. / The server is currently overloaded.");
|
||||
try {
|
||||
var parser = new HtmlParser();
|
||||
var doc = parser.ParseDocument(result.Content);
|
||||
|
||||
@@ -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