From b184475290e204bdcfd833d34939440c4a81430b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 8 Jul 2021 19:52:50 +0200 Subject: Youtube: fix comments by replacing removed comments ajax api with next api --- plugins/Youtube.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index 1b17c7b..2958c44 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -49,27 +49,27 @@ namespace QuickMedia { class YoutubeCommentsPage : public LazyFetchPage { public: - YoutubeCommentsPage(Program *program, const std::string &xsrf_token, const std::string &continuation_token) : LazyFetchPage(program), xsrf_token(xsrf_token), continuation_token(continuation_token) {} + YoutubeCommentsPage(Program *program, const std::string &video_url, const std::string &continuation_token) : LazyFetchPage(program), video_url(video_url), continuation_token(continuation_token) {} const char* get_title() const override { return "Comments"; } PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; PluginResult lazy_fetch(BodyItems &result_items) override; private: int current_page = 0; - std::string xsrf_token; + std::string video_url; std::string continuation_token; }; class YoutubeCommentRepliesPage : public LazyFetchPage { public: - YoutubeCommentRepliesPage(Program *program, const std::string &xsrf_token, const std::string &continuation_token) : LazyFetchPage(program), xsrf_token(xsrf_token), continuation_token(continuation_token) {} + YoutubeCommentRepliesPage(Program *program, const std::string &video_url, const std::string &continuation_token) : LazyFetchPage(program), video_url(video_url), continuation_token(continuation_token) {} const char* get_title() const override { return "Comment replies"; } PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; PluginResult lazy_fetch(BodyItems &result_items) override; private: int current_page = 0; - std::string xsrf_token; + std::string video_url; std::string continuation_token; }; @@ -155,7 +155,6 @@ namespace QuickMedia { void parse_formats(const Json::Value &streaming_data_json); private: std::string timestamp; - std::string xsrf_token; std::string comments_continuation_token; std::string livestream_url; std::vector video_formats; @@ -165,4 +164,4 @@ namespace QuickMedia { std::string watchtime_url; std::string tracking_url; }; -} \ No newline at end of file +} -- cgit v1.2.3