aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-08 19:52:50 +0200
committerdec05eba <dec05eba@protonmail.com>2021-07-08 20:10:13 +0200
commitb184475290e204bdcfd833d34939440c4a81430b (patch)
tree3f65383d807fd6199b68917dd95917add20df624 /plugins
parentad8ce8db94a13f36aaeb0b802670a9f092f46b96 (diff)
Youtube: fix comments by replacing removed comments ajax api with next api
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Youtube.hpp11
1 files changed, 5 insertions, 6 deletions
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<Tab> &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<Tab> &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<YoutubeVideoFormat> video_formats;
@@ -165,4 +164,4 @@ namespace QuickMedia {
std::string watchtime_url;
std::string tracking_url;
};
-} \ No newline at end of file
+}