aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/NyaaSi.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-23 21:34:16 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-23 21:34:16 +0200
commit23dd37254cdf7479b88a7f1d711ecb5de92440e8 (patch)
treee6afe4017d1eda01d5eefe584470fb65fa92a1f4 /src/plugins/NyaaSi.cpp
parentc7a89aa1ad853705e103e46ddba52697afb4e40b (diff)
Fix broken nyaa torrent page for trusted users
Diffstat (limited to 'src/plugins/NyaaSi.cpp')
-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));