yt-channel-info
yt-channel-info copied to clipboard
Invalid regular expression
youtube-grabber.js, line 264~267
channelInfo = {
channelId: channelPageResponse.data.responseContext.serviceTrackingParams.find((service) => service.service === 'GOOGLE_HELP').params[0].value,
channelName: new RegExp(`${firstVideoTitle.runs[0].text} by (.*?) ${firstPublishTimeText.simpleText}`, 'g').exec(firstVideoTitle.accessibility.accessibilityData.label)[1]
}
channelName: new RegExp(`${firstVideoTitle.runs[0].text} by (.*?) ${firstPublishTimeText.simpleText}`, 'g').exec
c(firstVideoTitle.accessibility.accessibilityData.label)[1]
^
SyntaxError: Invalid regular expression: /왁피셜)돚거 폼 미쳤다 by (.*?) 1 month ago/: Unmatched ')'
at new RegExp (<anonymous>)
at YoutubeGrabber.getChannelVideosMore (C:\Users\GurumNyang\Documents\Github\drabulyfinder2\node_modules\yt-channel-
-info\app\youtube-grabber.js:267:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.getChannelVideos (C:\Users\GurumNyang\Documents\Github\drabulyfinder2\src\utils\youtube\scrapVideo.j
js:121:23)
cannot process this video
video Title: 왁피셜)돚거 폼 미쳤다
my solution. I removed video title, using firstVideoTitle.accessibility.accessibilityData.label.replace(firstVideoTitle.runs[0].text, "")
channelInfo = {
channelId: channelPageResponse.data.responseContext.serviceTrackingParams.find((service) => service.service === 'GOOGLE_HELP').params[0].value,
channelName: new RegExp(` by (.*?) ${firstPublishTimeText.simpleText}`, 'g').exec(firstVideoTitle.accessibility.accessibilityData.label.replace(firstVideoTitle.runs[0].text, ""))[1]
}
```