Correction for #4199 (#4206)

After the last page a new link was appeared for premium action.
Now it will not parsed as page link
This commit is contained in:
morpheus133
2018-11-23 00:01:39 +01:00
committed by garfield69
parent e7d52575ad
commit 89eeee5939

View File

@@ -277,12 +277,17 @@ namespace Jackett.Common.Indexers
if (pagelinks.Length > 0)
{
// If there are several pages find the link for the latest one
var last_page_link = (pagelinks[pagelinks.Length - 1].Cq().Attr("href")).Trim();
// find out the number of the last page from the link
Match match = Regex.Match(last_page_link, @"(?<=[\?,&]oldal=)(\d+)(?=&)");
numVal = Int32.Parse(match.Value);
}
for (int i= pagelinks.Length - 1; i > 0; i--)
{
var last_page_link = (pagelinks[i].Cq().Attr("href")).Trim();
if (last_page_link.Contains("oldal"))
{
Match match = Regex.Match(last_page_link, @"(?<=[\?,&]oldal=)(\d+)(?=&)");
numVal = Int32.Parse(match.Value);
break;
}
}
}
var limit = query.Limit;
if (limit == 0)