diff --git a/libcommsy.hpp b/libcommsy.hpp index ea7df5c..7986195 100644 --- a/libcommsy.hpp +++ b/libcommsy.hpp @@ -228,18 +228,18 @@ std::string get_post_meta(GumboNode *node) { return clean_spaces(trim(gumbo_cleantext(metanodes[1]))); } -bool get_post_unread(GumboNode *node) { - std::vector elems; - gumbo_search_by_class(elems, node, "cs-comment-change-info", GUMBO_TAG_DIV); - return !elems.empty(); -} - std::string get_post_url(GumboNode *node) { std::vector titlenodes; gumbo_search_by_class(titlenodes, node, "uk-comment-title", GUMBO_TAG_H4); return gumbo_get_attr(titlenodes[0], "href", GUMBO_TAG_A)[0]; } +bool get_post_unread(GumboNode *node) { + std::vector elems; + gumbo_search_by_class(elems, node, "cs-comment-change-info", GUMBO_TAG_DIV); + return !elems.empty(); +} + std::vector> get_post_files(GumboNode *node) { std::vector metanodes; std::vector fileurls; @@ -319,8 +319,8 @@ struct commsyPost { std::string id; std::string description; std::string meta; - bool unread; std::string url; + bool unread; std::vector files; };