Skip to content

Commit

Permalink
fix(api): update liveStream Id detect method (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
sawaYch authored Aug 23, 2024
1 parent a941dee commit 292d9ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-eels-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"next-youtube-livechat": major
---

fix youtube livestream id parsing method
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.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getOptionsFromLivePage(
): FetchOptions & { liveId: string } {
let liveId: string;
const idResult = data.match(
/<link rel="canonical" href="https:\/\/www.youtube.com\/watch\?v=(.+?)">/
/href="https:\/\/m.youtube.com\/watch\?v=(.+?)">/
);
if (idResult) {
liveId = idResult[1];
Expand Down

0 comments on commit 292d9ae

Please sign in to comment.