From 23dd37254cdf7479b88a7f1d711ecb5de92440e8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 23 Sep 2020 21:34:16 +0200 Subject: Fix broken nyaa torrent page for trusted users --- src/plugins/NyaaSi.cpp | 6 ++---- 1 file 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("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(strip(text)); //body_item->url = "https://nyaa.si/" + std::string(href); item_data->push_back(std::move(body_item)); -- cgit v1.2.3