From 539d9b457c4f30ef0731a479772212e7ce8bfd7c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 30 Mar 2021 00:45:51 +0200 Subject: Remove tor option. Use torsocks instead (which is what quickmedia did anyways) --- src/plugins/Mangatown.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/Mangatown.cpp') diff --git a/src/plugins/Mangatown.cpp b/src/plugins/Mangatown.cpp index 1d4d71a..ec5f279 100644 --- a/src/plugins/Mangatown.cpp +++ b/src/plugins/Mangatown.cpp @@ -12,13 +12,13 @@ namespace QuickMedia { return atoi(str) != 0; } - static SearchResult search_page(const std::string &str, int page, bool use_tor, BodyItems &result_items) { + static SearchResult search_page(const std::string &str, int page, BodyItems &result_items) { std::string url = "https://www.mangatown.com/search?name="; url += url_param_encode(str); url += "&page=" + std::to_string(page); std::string website_data; - if(download_to_string(url, website_data, {}, use_tor, true) != DownloadResult::OK) + if(download_to_string(url, website_data, {}, true) != DownloadResult::OK) return SearchResult::NET_ERR; if(website_data.empty()) @@ -61,18 +61,18 @@ namespace QuickMedia { } SearchResult MangatownSearchPage::search(const std::string &str, BodyItems &result_items) { - return search_page(str, 1, is_tor_enabled(), result_items); + return search_page(str, 1, result_items); } PluginResult MangatownSearchPage::get_page(const std::string &str, int page, BodyItems &result_items) { - return search_result_to_plugin_result(search_page(str, 1 + page, is_tor_enabled(), result_items)); + return search_result_to_plugin_result(search_page(str, 1 + page, result_items)); } PluginResult MangatownSearchPage::submit(const std::string &title, const std::string &url, std::vector &result_tabs) { BodyItems chapters_items; std::string website_data; - if(download_to_string(url, website_data, {}, is_tor_enabled(), true) != DownloadResult::OK) + if(download_to_string(url, website_data, {}, true) != DownloadResult::OK) return PluginResult::NET_ERR; QuickMediaHtmlSearch html_search; @@ -149,7 +149,7 @@ namespace QuickMedia { for(const std::string &full_url : chapter_image_urls) { std::string image_src; std::string website_data; - if(download_to_string_cache(full_url, website_data, {}, is_tor_enabled(), true) != DownloadResult::OK) + if(download_to_string_cache(full_url, website_data, {}, true) != DownloadResult::OK) break; QuickMediaHtmlSearch html_search; @@ -192,7 +192,7 @@ namespace QuickMedia { int num_pages = 0; std::string website_data; - if(download_to_string(url, website_data, {}, is_tor_enabled(), true) != DownloadResult::OK) + if(download_to_string(url, website_data, {}, true) != DownloadResult::OK) return ImageResult::NET_ERR; QuickMediaHtmlSearch html_search; -- cgit v1.2.3