From 3ebe3601d15d2cd13cab3d284184dfff26239b4a Mon Sep 17 00:00:00 2001 From: dargy Date: Fri, 9 Aug 2024 15:26:03 -0500 Subject: [PATCH] minor: fix regex pattern #11 added credit (apologies for not doing it sooner) and removed /g --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 94150bb..f269ebb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,8 +11,9 @@ const app = new Hono() const awemeIdPattern = /^\d{1,19}$/ const awemeLinkPattern = /\/@([\w\d_.]+)\/(video|photo|live)\/?(\d{19})?/ +// Credit: https://github.com/FixTweet/FxTwitter/blob/b6564868719473f926c4e7e28ec95059506f69e2/src/constants.ts#L24 const BOT_REGEX = - /bot|facebook|embed|got|firefox\/92|curl|wget|go-http|yahoo|generator|whatsapp|discord|preview|link|proxy|vkshare|images|analyzer|index|crawl|spider|python|cfnetwork|node/gi + /bot|facebook|embed|got|firefox\/92|firefox\/38|curl|wget|go-http|yahoo|generator|whatsapp|revoltchat|preview|link|proxy|vkshare|images|analyzer|index|crawl|spider|python|cfnetwork|node|mastodon|http\.rb|ruby|bun\/|fiddler|iframely|steamchaturllookup/i app.get('/test/:videoId', async (c) => { const { videoId } = c.req.param()