use eslint auto fix

This commit is contained in:
duanfuxiang
2025-01-07 12:27:22 +08:00
parent d8573c7889
commit 8d253faddc
41 changed files with 890 additions and 1569 deletions

View File

@@ -98,7 +98,7 @@ export class YoutubeTranscript {
const videoPageBody = videoPageResponse.text
// Extract title using regex from <title> tags
const titleMatch = videoPageBody.match(/<title>(.*?)<\/title>/)
const titleMatch = /<title>(.*?)<\/title>/.exec(videoPageBody)
const title = titleMatch
? titleMatch[1].replace(' - YouTube', '').trim()
: ''
@@ -189,7 +189,7 @@ export class YoutubeTranscript {
if (videoId.length === 11) {
return videoId
}
const matchId = videoId.match(RE_YOUTUBE)
const matchId = RE_YOUTUBE.exec(videoId)
if (matchId?.length) {
return matchId[1]
}