From 81f258005b9ab2bb581d3db874b2b581157862ef Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 6 Oct 2020 21:57:14 +0200 Subject: Nyaa.si: fix torrents by anonymous not working if there are no comments --- src/plugins/NyaaSi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp index f6724b2..e29b2b0 100644 --- a/src/plugins/NyaaSi.cpp +++ b/src/plugins/NyaaSi.cpp @@ -270,7 +270,7 @@ namespace QuickMedia { goto cleanup; } - result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='panel-body']//a", + result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='panel-body']//div[class='row']//a", [](QuickMediaHtmlNode *node, void *userdata) { auto *item_data = (BodyItems*)userdata; const char *href = quickmedia_html_node_get_attribute_value(node, "href"); @@ -287,9 +287,9 @@ namespace QuickMedia { goto cleanup; if(result_items.empty()) { - fprintf(stderr, "Error: nyaa.si: failed to get submitter\n"); - result = -1; - goto cleanup; + auto body_item = BodyItem::create(""); + body_item->set_description("Submitter: Anonymous"); + result_items.push_back(std::move(body_item)); } result_items.front()->set_title(strip(title)); -- cgit v1.2.3