diff options
-rw-r--r-- | src/plugins/Youtube.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 3813068..4add02c 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -337,6 +337,17 @@ 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 response; + DownloadResult result = download_to_string("https://youtube.com/subscription_manager?disable_polymer=1", response, std::move(additional_args), true); + if(result != DownloadResult::OK) + fprintf(stderr, "Failed to fetch cookies to view youtube comments\n"); } return { |