From 5096a088d42594adc7a724a082d7bb31b631665c Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 9 Apr 2024 04:49:27 +0300 Subject: [PATCH] Fixed: (IPTorrents) Improve category selector --- src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs index 1156b56e3..305335761 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs @@ -333,7 +333,7 @@ namespace NzbDrone.Core.Indexers.Definitions var publishDate = DateTimeUtil.FromTimeAgo(dateSplit.First()); var description = descrSplit.Length > 1 ? "Tags: " + descrSplit.First().Trim() : ""; - var catIcon = row.QuerySelector("td:nth-of-type(1) a"); + var catIcon = row.QuerySelector("td:nth-of-type(1) a[href^=\"?\"]"); if (catIcon == null) { // Torrents - Category column == Text or Code @@ -342,7 +342,7 @@ namespace NzbDrone.Core.Indexers.Definitions } // Torrents - Category column == Icons - var cat = _categories.MapTrackerCatToNewznab(catIcon.GetAttribute("href").Substring(1)); + var cat = _categories.MapTrackerCatToNewznab(catIcon.GetAttribute("href")?.Substring(1)); var size = ParseUtil.GetBytes(row.Children[sizeIndex].TextContent);