Skip to content

Commit

Permalink
(Func): Chinese v. not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
kang49 committed Mar 3, 2024
1 parent 27f1d6b commit 9a6783e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ app.get(/\/api$/, async (req, res) => {

// Convert to string
var BiliLink = String(biliLink || '').replace('%20', ' ');
// Handle not support bilbili.com
if (BiliLink.includes("bilibili.com")) {
return res.status(400).json({ error: `We do not support the Chinese version of Bilibili url.` });
}
console.log(BiliLink);

const linkRegex = /(https?:\/\/[^\s]+)/;
Expand Down

0 comments on commit 9a6783e

Please sign in to comment.