aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-13 08:09:33 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-13 08:09:33 +0200
commitfc632e90d793babc47044ff87ab63a86211e0bd0 (patch)
tree8865a3fe337cf7e1aa9cd53c123d804a762b5cab
parent84984bdfd0273b789e0c9bfe397440dd6912912d (diff)
Fix youtube comments
-rw-r--r--src/plugins/Youtube.cpp11
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 {