diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-16 15:59:51 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-16 15:59:51 +0200 |
commit | b95298d79eee764c48dfec9d329026548392484c (patch) | |
tree | ea422d0971eb3f3fe5f399be70ab727f12bffedb /src/plugins | |
parent | 8d661807e363c973dc6a6d7e6015495e7cc3a2ab (diff) |
Revert back to non quick search and without description for mangadex
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Mangadex.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index 705cbc5..6a8f8a7 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -172,7 +172,7 @@ namespace QuickMedia { if(!get_rememberme_token(rememberme_token)) return SuggestionResult::ERR; - std::string url = "https://mangadex.org/quick_search/"; + std::string url = "https://mangadex.org/search?title="; url += url_param_encode(text); CommandArg cookie_arg = { "-H", "cookie: mangadex_rememberme_token=" + rememberme_token }; @@ -217,18 +217,18 @@ namespace QuickMedia { if(result != 0) goto cleanup; - body_item_image_context.index = 0; - result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='pl-1']", - [](QuickMediaHtmlNode *node, void *userdata) { - auto *item_data = (BodyItemImageContext*)userdata; - const char *text = quickmedia_html_node_get_text(node); - if(text && item_data->index < item_data->body_items->size()) { - std::string desc = strip(text); - std::replace_if(desc.begin(), desc.end(), [](int c) { return c == '\n'; }, ' '); - (*item_data->body_items)[item_data->index]->set_description(std::move(desc)); - item_data->index++; - } - }, &body_item_image_context); + // body_item_image_context.index = 0; + // result = quickmedia_html_find_nodes_xpath(&html_search, "//div[class='pl-1']", + // [](QuickMediaHtmlNode *node, void *userdata) { + // auto *item_data = (BodyItemImageContext*)userdata; + // const char *text = quickmedia_html_node_get_text(node); + // if(text && item_data->index < item_data->body_items->size()) { + // std::string desc = strip(text); + // std::replace_if(desc.begin(), desc.end(), [](int c) { return c == '\n'; }, ' '); + // (*item_data->body_items)[item_data->index]->set_description(std::move(desc)); + // item_data->index++; + // } + // }, &body_item_image_context); cleanup: quickmedia_html_search_deinit(&html_search); |