diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-13 08:09:33 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-13 08:09:33 +0200 |
commit | fc632e90d793babc47044ff87ab63a86211e0bd0 (patch) | |
tree | 8865a3fe337cf7e1aa9cd53c123d804a762b5cab | |
parent | 84984bdfd0273b789e0c9bfe397440dd6912912d (diff) |
Fix youtube comments
-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 { |