Convert TVStore to AngleSharp (#7385)

This commit is contained in:
Diego Heras 2020-02-29 20:42:11 +01:00 committed by GitHub
parent 1533ad1927
commit a697aba985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using CsQuery;
using AngleSharp.Html.Parser;
using Jackett.Common.Models;
using Jackett.Common.Models.IndexerConfig.Bespoke;
using Jackett.Common.Services.Interfaces;
@ -126,8 +126,8 @@ namespace Jackett.Common.Indexers
var parameters = content.Split(new string[] { "\\" }, StringSplitOptions.None);
var type = "normal";
/*
* Split the releases by '\' and go through them.
/*
* Split the releases by '\' and go through them.
* 27 element belongs to one torrent
*/
for (var j = previously_parsed_on_page * 27; (j + 27 < parameters.Length && ((already_found + releases.Count) < limit)); j = j + 27)
@ -199,7 +199,7 @@ namespace Jackett.Common.Indexers
return releases;
}
/* Search is possible only based by Series ID.
/* Search is possible only based by Series ID.
* All known series ID is on main page, with their attributes. (ID, EngName, HunName, imdbid)
*/
@ -215,11 +215,11 @@ namespace Jackett.Common.Indexers
protected async Task<bool> GetSeriesInfo()
{
var result = (await RequestStringWithCookiesAndRetry(BrowseUrl)).Content;
CQ dom = result;
var scripts = dom["script"];
var result = await RequestStringWithCookiesAndRetry(BrowseUrl);
var parser = new HtmlParser();
var dom = parser.ParseDocument(result.Content);
var scripts = dom.QuerySelectorAll("script");
foreach (var script in scripts)
{
if (script.TextContent.Contains("catsh=Array"))