diff --git a/package-lock.json b/package-lock.json index 91738e2da..38e3ff7b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19463,9 +19463,9 @@ } }, "yt-comment-scraper": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/yt-comment-scraper/-/yt-comment-scraper-4.0.4.tgz", - "integrity": "sha512-6siEScAU7aqV8fzUexHlUd4w13JPZMQ0y2d+yDbFEoKU43jkFbVtAZ3IxTRCBpfDV7rKkaoAy8umD9y5goaV2Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yt-comment-scraper/-/yt-comment-scraper-5.0.1.tgz", + "integrity": "sha512-FgUD7TuWD8RdleGi+0IiITE7oOfokTldXeawFwQDwYhufGkm6ttIBEmMzuGzorHN/aPinmAKYBttvaZkG4s5Yw==", "requires": { "axios": "^0.21.1", "node-html-parser": "^2.0.2" diff --git a/package.json b/package.json index 7361183a2..2764b9631 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "youtube-chat": "git+https://github.com/IcedCoffeee/youtube-chat.git", "youtube-suggest": "^1.1.2", "yt-channel-info": "^2.2.0", - "yt-comment-scraper": "^4.0.4", + "yt-comment-scraper": "^5.0.1", "yt-dash-manifest-generator": "1.1.0", "yt-trending-scraper": "^2.0.0", "ytdl-core": "^4.8.2", diff --git a/src/process/comment-module-controller.js b/src/process/comment-module-controller.js deleted file mode 100644 index 2fc252d11..000000000 --- a/src/process/comment-module-controller.js +++ /dev/null @@ -1,23 +0,0 @@ -const ModuleScraper = require('yt-comment-scraper') -let scraper = null -let currentSort = null -let currentVideoId = null - -process.on('message', (msg) => { - if (msg === 'end') { - process.exit(0) - } - if (msg.id !== currentVideoId || msg.sortNewest !== currentSort) { - if (scraper !== null) { - scraper.cleanupStatics() - } - currentSort = msg.sortNewest - currentVideoId = msg.id - scraper = new ModuleScraper(true, currentSort) - } - scraper.scrape_next_page_youtube_comments(currentVideoId).then((comments) => { - process.send({ comments: JSON.stringify(comments), error: null }) - }).catch((error) => { - process.send({ comments: null, error: error }) - }) -}) diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 46cfbf8e8..c6f60db44 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -164,7 +164,7 @@ export default Vue.extend({ videoId: this.id, setCookie: false, sortByNewest: this.sortNewest, - continuation: this.commentData[index].replyToken, + replyToken: this.commentData[index].replyToken, index: index }) break @@ -202,7 +202,8 @@ export default Vue.extend({ this.showToast({ message: this.$t('Comments.Getting comment replies, please wait') }) - ytcm.getCommentReplies(payload.videoId, payload.continuation).then((response) => { + + ytcm.getCommentReplies(payload).then((response) => { this.parseLocalCommentData(response, payload.index) }).catch((err) => { console.log(err)