Skip to content

Commit

Permalink
Fix video id getting
Browse files Browse the repository at this point in the history
  • Loading branch information
Davilarek committed Nov 15, 2023
1 parent c270a96 commit 7e16af9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ class TekstowoAPI {
? new URL("http://localhost/?" + responseText.split("//filmiki4.maxart.pl/tplayer3n/#")[1].split("\"")[0]).searchParams.get("videoId")
: null;
};
const videoId = withVideoId === true ? findVideoId() : null;
const findVideoId2 = () => {
return responseText.includes("//www.youtube.com/embed/")
? new URL("http://localhost/?videoId=" + responseText.split("//www.youtube.com/embed/")[1].split("\"")[0]).searchParams.get("videoId")
: null;
};
const videoId = withVideoId === true ? (findVideoId() ?? findVideoId2()) : null;
return new TekstowoAPILyrics(lyricsNormal, lyricsTranslated, metaData, parsedName, videoId);
}
/**
Expand Down

0 comments on commit 7e16af9

Please sign in to comment.