23 std::string website_url;
28 std::string media_url;
31 std::string author_name;
32 std::string author_url;
37 std::string extract_url();
43 std::string extract_media_url();
45 static inline const std::vector<ExtractionParam> __IMG_URL_PARAMS{
56 std::string extract_img_url();
62 void fix_url(std::string &s);
64 static inline const std::vector<ExtractionParam> __CONTENT_PARAMS{
71 static inline const std::vector<ExtractionParam> __PUB_DATE_PARAMS{
78 static inline const std::vector<ExtractionParam> __AUTHOR_NAME_PARAMS{
85 static inline const std::vector<ExtractionParam> __AUTHOR_URL_PARAMS{
105 xml_node item_node, std::string website_url
106 ): item_node{item_node}, website_url{website_url} {
Represents a feed item or article.
Definition feed_item.hpp:20
std::string get_title()
Definition feed_item.hpp:110
std::string get_pub_date()
Definition feed_item.hpp:114
std::string get_author_url()
Definition feed_item.hpp:117
std::string get_url()
Definition feed_item.hpp:112
std::string to_json()
Represents the FeedItem object (itself) as a json, returned as a string.
Definition feed_item.cpp:87
FeedItem(xml_node item_node, std::string website_url)
Constructs the FeedItem object from a pugi::xml_node representing a feed item.
Definition feed_item.hpp:104
std::string get_content()
Definition feed_item.hpp:111
std::string get_author_name()
Definition feed_item.hpp:116
std::string get_img_url()
Definition feed_item.hpp:115
std::string get_media_url()
Definition feed_item.hpp:113