mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
lostfilm: try to prevent parse error #14638
tested with non-Russian IP for regular TEST However error only occurs with Russian IP so that is untested as I don't have a VPN to access that region.
This commit is contained in:
@@ -717,6 +717,8 @@ namespace Jackett.Common.Indexers
|
|||||||
var document = parser.ParseDocument(results.ContentString);
|
var document = parser.ParseDocument(results.ContentString);
|
||||||
var rows = document.QuerySelectorAll("div.inner-box--item");
|
var rows = document.QuerySelectorAll("div.inner-box--item");
|
||||||
|
|
||||||
|
if (rows.Count() > 0)
|
||||||
|
{
|
||||||
logger.Debug("> Parsing " + rows.Count().ToString() + " releases");
|
logger.Debug("> Parsing " + rows.Count().ToString() + " releases");
|
||||||
|
|
||||||
var serieTitle = document.QuerySelector("div.inner-box--subtitle").TextContent;
|
var serieTitle = document.QuerySelector("div.inner-box--subtitle").TextContent;
|
||||||
@@ -803,11 +805,23 @@ namespace Jackett.Common.Indexers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (results.ContentString.Contains("Контент недоступен на территории Российской Федерации"))
|
||||||
|
{
|
||||||
|
logger.Debug($"> Content is not available in the Russian Federation");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var message = document.QuerySelector("p").TextContent;
|
||||||
|
logger.Debug($"> {message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
OnParseError(results.ContentString, ex);
|
OnParseError(results.ContentString, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return releases;
|
return releases;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user