mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 06:03:09 +00:00
Fixed: Unset variable in CardigannIndexer if it's missing in the row (#9305)
This commit is contained in:
parent
5a856b2777
commit
37a9d6b393
6 changed files with 5 additions and 20 deletions
|
@ -79,8 +79,6 @@ search:
|
|||
rows:
|
||||
selector: table[border="1"][cellpadding=5] > tbody > tr:has(a[href^="details.php?id="])
|
||||
fields:
|
||||
is_polish: # Workaround: https://github.com/Jackett/Jackett/issues/8068#issuecomment-610222414
|
||||
text: ""
|
||||
is_polish:
|
||||
optional: true
|
||||
selector: img[src*="cat_pl"]
|
||||
|
|
|
@ -61,8 +61,6 @@ search:
|
|||
filters:
|
||||
- name: querystring
|
||||
args: cat
|
||||
extras:
|
||||
text: ""
|
||||
extras:
|
||||
optional: true
|
||||
selector: td.titulo a[class]
|
||||
|
|
|
@ -118,21 +118,15 @@ search:
|
|||
selector: td:nth-child(13)
|
||||
leechers:
|
||||
selector: td:nth-child(14)
|
||||
subs:
|
||||
text: ""
|
||||
subs:
|
||||
selector: span:contains("Subs:")
|
||||
optional: true
|
||||
genre:
|
||||
text: ""
|
||||
genre:
|
||||
selector: td:nth-child(5)
|
||||
optional: true
|
||||
filters:
|
||||
- name: prepend
|
||||
args: "Genre: "
|
||||
mom:
|
||||
text: ""
|
||||
mom:
|
||||
selector: img[title^="CURRENT"]
|
||||
attribute: title
|
||||
|
|
|
@ -42,24 +42,18 @@ search:
|
|||
selector: img
|
||||
attribute: src
|
||||
optional: true
|
||||
actress:
|
||||
text: ""
|
||||
actress:
|
||||
selector: a[href^="/actress/"]
|
||||
optional: true
|
||||
filters:
|
||||
- name: prepend
|
||||
args: "Actress: "
|
||||
tags:
|
||||
text: ""
|
||||
tags:
|
||||
selector: div.tags
|
||||
optional: true
|
||||
filters:
|
||||
- name: prepend
|
||||
args: "Tags: "
|
||||
descr:
|
||||
text: ""
|
||||
descr:
|
||||
selector: p.level
|
||||
optional: true
|
||||
|
|
|
@ -136,8 +136,6 @@ search:
|
|||
optional: true
|
||||
selector: a[href*="imdb.com/title/tt"]
|
||||
attribute: href
|
||||
description:
|
||||
text: ""
|
||||
description:
|
||||
optional: true
|
||||
selector: img[src="pic/pl.jpg"]
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Jackett.Common.Indexers
|
|||
set => base.configData = value;
|
||||
}
|
||||
|
||||
protected readonly string[] OptionalFileds = new string[] { "imdb", "rageid", "tvdbid", "banner" };
|
||||
protected readonly string[] OptionalFields = new string[] { "imdb", "rageid", "tvdbid", "banner" };
|
||||
|
||||
private static readonly string[] _SupportedLogicFunctions =
|
||||
{
|
||||
|
@ -1587,8 +1587,11 @@ namespace Jackett.Common.Indexers
|
|||
{
|
||||
if (!variables.ContainsKey(variablesKey))
|
||||
variables[variablesKey] = null;
|
||||
if (OptionalFileds.Contains(Field.Key) || FieldModifiers.Contains("optional") || Field.Value.Optional)
|
||||
if (OptionalFields.Contains(Field.Key) || FieldModifiers.Contains("optional") || Field.Value.Optional)
|
||||
{
|
||||
variables[variablesKey] = null;
|
||||
continue;
|
||||
}
|
||||
throw new Exception(string.Format("Error while parsing field={0}, selector={1}, value={2}: {3}", Field.Key, Field.Value.Selector, (value == null ? "<null>" : value), ex.Message));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue