Skip to content

Commit

Permalink
fix: thumbnail parse method (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sawaYch authored Apr 5, 2024
1 parent eb28a2f commit e100ee6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brave-glasses-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"next-youtube-livechat": patch
---

fix(api): livestream thumbnail parser method
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function getOptionsFromLivePage(

let liveThumbnail: string;
const liveThumbnailResult = data.match(
/<link rel="image_src" href="https:\/\/i.ytimg.com\/vi\/[^\s-]*\/maxresdefault_live.jpg">/
/<link rel="image_src" href="https:\/\/i.ytimg.com\/vi\/[^\s]+\/maxresdefault_live.jpg">/
);
if (liveThumbnailResult) {
liveThumbnail = liveThumbnailResult[0];
Expand Down

0 comments on commit e100ee6

Please sign in to comment.