aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/NyaaSi.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp
index 1dbd4f3..04a71f2 100644
--- a/src/plugins/NyaaSi.cpp
+++ b/src/plugins/NyaaSi.cpp
@@ -190,9 +190,8 @@ namespace QuickMedia {
[](QuickMediaHtmlNode *node, void *userdata) {
auto *item_data = (BodyItems*)userdata;
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
- const char *title = quickmedia_html_node_get_attribute_value(node, "title");
const char *text = quickmedia_html_node_get_text(node);
- if(item_data->empty() && href && title && text && strcmp(title, "User") == 0 && strncmp(href, "/user/", 6) == 0) {
+ if(item_data->empty() && href && text && strncmp(href, "/user/", 6) == 0) {
auto body_item = std::make_unique<BodyItem>("Submitter: " + strip(text));
body_item->url = "https://nyaa.si/" + std::string(href);
item_data->push_back(std::move(body_item));
@@ -249,9 +248,8 @@ namespace QuickMedia {
[](QuickMediaHtmlNode *node, void *userdata) {
auto *item_data = (BodyItems*)userdata;
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
- const char *title = quickmedia_html_node_get_attribute_value(node, "title");
const char *text = quickmedia_html_node_get_text(node);
- if(href && title && text && strcmp(title, "User") == 0) {
+ if(href && text && strncmp(href, "/user/", 6) == 0) {
auto body_item = std::make_unique<BodyItem>(strip(text));
//body_item->url = "https://nyaa.si/" + std::string(href);
item_data->push_back(std::move(body_item));