New: Improve size and number parsing

This commit is contained in:
Qstick
2021-10-06 21:55:35 -05:00
parent 25bb10d62b
commit 293b32ea0e
25 changed files with 103 additions and 68 deletions
@@ -281,7 +281,7 @@ namespace NzbDrone.Core.Indexers.Definitions
var dateString = row.QuerySelector("td:nth-child(6) nobr").TextContent.Trim();
var publishDate = DateTime.ParseExact(dateString, "yyyy-MM-ddHH:mm:ss", CultureInfo.InvariantCulture);
var size = ReleaseInfo.GetBytes(row.QuerySelector("td:nth-child(7)").InnerHtml.Split('<').First().Trim());
var size = ParseUtil.GetBytes(row.QuerySelector("td:nth-child(7)").InnerHtml.Split('<').First().Trim());
var files = ParseUtil.GetLongFromString(row.QuerySelector("td:nth-child(7) > a").TextContent);
var grabs = ParseUtil.GetLongFromString(row.QuerySelector("td:nth-child(8)").TextContent);
var seeders = ParseUtil.CoerceInt(row.QuerySelector("td:nth-child(9)").TextContent);