mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
cardigann: add var substitution to the search block selector statement.
This commit is contained in:
@@ -1141,14 +1141,15 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
if (Selector.Selector != null)
|
if (Selector.Selector != null)
|
||||||
{
|
{
|
||||||
if (Dom.Matches(Selector.Selector))
|
var selector_Selector = applyGoTemplateText(Selector.Selector, variables);
|
||||||
|
if (Dom.Matches(selector_Selector))
|
||||||
selection = Dom;
|
selection = Dom;
|
||||||
else
|
else
|
||||||
selection = QuerySelector(Dom, Selector.Selector);
|
selection = QuerySelector(Dom, selector_Selector);
|
||||||
if (selection == null)
|
if (selection == null)
|
||||||
{
|
{
|
||||||
if (required)
|
if (required)
|
||||||
throw new Exception(string.Format("Selector \"{0}\" didn't match {1}", Selector.Selector, Dom.ToHtmlPretty()));
|
throw new Exception(string.Format("Selector \"{0}\" didn't match {1}", selector_Selector, Dom.ToHtmlPretty()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user