diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-06 21:57:14 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-06 21:57:14 +0200 |
commit | 81f258005b9ab2bb581d3db874b2b581157862ef (patch) | |
tree | 9ba3fe3eea6ba56c7b63b27892900f94d7e51144 /src/plugins | |
parent | 0b7869720e3d820dbe92cc26219eccbe897dc3a4 (diff) |
Nyaa.si: fix torrents by anonymous not working if there are no comments
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/NyaaSi.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |