aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Youtube.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index d03105c..993c861 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -343,15 +343,9 @@ namespace QuickMedia {
cookies_filepath = filename;
atexit(remove_cookies_file_at_exit);
- std::vector<CommandArg> additional_args = {
- CommandArg{ "-b", cookies_filepath },
- CommandArg{ "-c", cookies_filepath }
- };
-
// TODO: Is there any way to bypass this? this is needed to set VISITOR_INFO1_LIVE which is required to read comments
- std::string website_data;
- DownloadResult result = download_to_string("https://youtube.com/subscription_manager?disable_polymer=1", website_data, std::move(additional_args), true);
- if(result != DownloadResult::OK)
+ const char *args[] = { "curl", "-I", "-s", "-b", cookies_filepath.c_str(), "-c", cookies_filepath.c_str(), "https://www.youtube.com/subscription_manager?disable_polymer=1", nullptr };
+ if(exec_program(args, nullptr, nullptr) != 0)
fprintf(stderr, "Failed to fetch cookies to view youtube comments\n");
}
@@ -525,7 +519,7 @@ namespace QuickMedia {
current_page = 0;
added_videos.clear();
- search_url = "https://youtube.com/results?search_query=";
+ search_url = "https://www.youtube.com/results?search_query=";
search_url += url_param_encode(str);
std::vector<CommandArg> additional_args = {