Skip to content

Commit 7fdfd80

Browse files
author
Mostey
committed
Fixed bug in reply parsing procedure
1 parent 7f93c14 commit 7fdfd80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/epvpapi/SectionThread.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ public List<SectionPost> Replies<TUser>(AuthenticatedSession<TUser> session, uin
326326
var postsRootNode = htmlDocument.GetElementbyId("posts");
327327
if (postsRootNode == null) continue;
328328

329-
foreach (var postContainerNode in postsRootNode.ChildNodes.GetElementsByTagName("div"))
329+
// for some reason, the lastpost container contains nothing and needs to be filtered out
330+
foreach (var postContainerNode in postsRootNode.ChildNodes.GetElementsByTagName("div").Where(element => element.Id != "lastpost"))
330331
{
331332
var parsedPost = new SectionPost(0, this);
332333
new SectionPostParser(parsedPost).Execute(postContainerNode);

0 commit comments

Comments
 (0)