mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
feat: add settings page parser (#154)
* feat: add settings page parsers * fix(AccountManager): small ts error * feat: add `CopyLink` & `SettingsCheckbox` * deps: remove “flat” dependency
This commit is contained in:
@@ -122,9 +122,7 @@ class Comment extends YTNode {
|
||||
const dialog_button = dialog.item().as(CommentReplyDialog).reply_button.item().as(ToggleButton);
|
||||
|
||||
const payload = {
|
||||
params: {
|
||||
commentText: text
|
||||
}
|
||||
commentText: text
|
||||
};
|
||||
|
||||
const response = await dialog_button.endpoint.callTest(this.#actions, payload);
|
||||
|
||||
@@ -35,7 +35,7 @@ class CommentThread extends YTNode {
|
||||
throw new InnertubeError('This comment has no replies.', { comment_id: this.comment?.comment_id });
|
||||
|
||||
const continuation = this.#replies.key('contents').parsed().array().get({ type: 'ContinuationItem' })?.as(ContinuationItem);
|
||||
const response = await continuation?.endpoint.callTest(this.#actions);
|
||||
const response = await continuation?.endpoint.callTest(this.#actions, { parse: true });
|
||||
|
||||
this.replies = response?.on_response_received_endpoints_memo?.getType(Comment).map((comment) => {
|
||||
comment.setActions(this.#actions);
|
||||
@@ -60,7 +60,7 @@ class CommentThread extends YTNode {
|
||||
if (!this.#actions)
|
||||
throw new InnertubeError('Actions not set for this CommentThread.');
|
||||
|
||||
const response = await this.#continuation.button?.item().key('endpoint').nodeOfType(NavigationEndpoint).callTest(this.#actions);
|
||||
const response = await this.#continuation.button?.item().key('endpoint').nodeOfType(NavigationEndpoint).callTest(this.#actions, { parse: true });
|
||||
|
||||
this.replies = response?.on_response_received_endpoints_memo.getType(Comment).map((comment) => {
|
||||
comment.setActions(this.#actions);
|
||||
|
||||
Reference in New Issue
Block a user