From e36ca25aa8d159d8159ec0f47c1aff662ac65f13 Mon Sep 17 00:00:00 2001 From: Sora Date: Mon, 22 Jul 2024 14:18:28 +0200 Subject: [PATCH] fix insta regex (#457) * add nodejs * fix instagram regex * add typescript --- flake.nix | 2 ++ src/commands/instagram.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 46640313..abff4c3d 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,8 @@ cairo pango biome + nodejs_22 + typescript ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreText ]); diff --git a/src/commands/instagram.ts b/src/commands/instagram.ts index c6bf20e9..32c02f38 100644 --- a/src/commands/instagram.ts +++ b/src/commands/instagram.ts @@ -5,7 +5,7 @@ import type { BotContext } from "../context.js"; import * as instagramService from "../service/instagramService.js"; const instagramOptions = { - uriPattern: /(?https?:\/\/(www\.)?instagram\.com\/(?:reel|tv|p)\/.*)\/.*/i, + uriPattern: /(?https?:\/\/(www\.)?instagram\.com\/(?:reel|tv|p)\/.*)\/?.*/i, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44",