Updated scanner logic to handle thumb VueJS components. Removed uneeded DLSiteWork fields.
This commit is contained in:
@@ -19,7 +19,8 @@ public class DLSiteHtmlNode
|
||||
public HtmlNode? SalesDateNode { get; private set; }
|
||||
public HtmlNode DownloadsNode { get; private set; }
|
||||
public HtmlNode? StarRatingNode { get; private set; }
|
||||
public HtmlNode ImageNode { get; private set; }
|
||||
public HtmlNode? ImageNode { get; private set; }
|
||||
public HtmlNode? ThumbWithNgFilterBlockNode { get; private set; }
|
||||
public HtmlNode[] GenreNodes { get; private set; }
|
||||
public HtmlNode[] SearchTagNodes { get; private set; }
|
||||
public HtmlNode[] CreatorNodes { get; private set; }
|
||||
@@ -55,7 +56,8 @@ public class DLSiteHtmlNode
|
||||
|
||||
//InitializeSalesAndDownloadsNodes();
|
||||
StarRatingNode = GetStarRatingNode();
|
||||
ImageNode = GetImageNode();
|
||||
ImageNode = TryGetImageNode();
|
||||
ThumbWithNgFilterBlockNode = ThumbNode.SelectSingleNode(".//thumb-with-ng-filter-block");
|
||||
}
|
||||
|
||||
private HtmlNode[] GetGenreNodes()
|
||||
@@ -165,10 +167,13 @@ public class DLSiteHtmlNode
|
||||
// }
|
||||
//}
|
||||
|
||||
private HtmlNode GetImageNode()
|
||||
private HtmlNode? TryGetImageNode()
|
||||
{
|
||||
HtmlNode linkNode = ThumbNode.SelectNodes(".//a")[0];
|
||||
HtmlNode? linkNode = ThumbNode.SelectSingleNode(".//a");
|
||||
|
||||
return linkNode.SelectNodes(".//img")[0];
|
||||
if (linkNode is null)
|
||||
return null;
|
||||
|
||||
return linkNode.SelectSingleNode(".//img");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user