Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from ChunkyProgrammer/master
Browse files Browse the repository at this point in the history
fix error when scraping videos with no comments
  • Loading branch information
GilgusMaximus authored Jun 3, 2021
2 parents 674088d + 7981471 commit 4b60efa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Youtube-Scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CommentScraper {

const commentPageResponse = await requester.requestCommentsPage(commentsPayload)
const commentHtml = commentPageResponse.data.response.continuationContents.itemSectionContinuation
const commentData = htmlParser.parseCommentData(commentHtml.contents)
const commentData = (typeof commentHtml.contents !== 'undefined') ? htmlParser.parseCommentData(commentHtml.contents) : []
const continuation = commentHtml.continuations

let ctoken = null
Expand Down

0 comments on commit 4b60efa

Please sign in to comment.