mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
fix: refactor Analytics to use memo
This commit is contained in:
@@ -12,10 +12,7 @@ class Analytics {
|
||||
constructor(response) {
|
||||
this.#page = Parser.parseResponse(response);
|
||||
|
||||
const tab = this.#page.contents.tabs.get({ selected: true });
|
||||
const item = tab.content.contents.get({ target_id: null });
|
||||
|
||||
this.sections = item.contents;
|
||||
this.sections = this.#page.contents_memo.get('Element');
|
||||
}
|
||||
|
||||
get page() {
|
||||
@@ -23,4 +20,4 @@ class Analytics {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Analytics;
|
||||
module.exports = Analytics;
|
||||
|
||||
Reference in New Issue
Block a user