Vlad Chikalkin 8919fbb65f
Feature/send post description (#5)
* feat: enhance download feature with caption support for Instagram

* feat: improve message handling with enhanced caching and error management

* feat: add hashtag removal utility and integrate it into caption formatting

* fix: bot sent caption without content from cache

* feat: refactor Instagram download URL handling to simplify video response structure
2026-01-14 18:26:24 +03:00

12 lines
565 B
TypeScript

/* eslint-disable sonarjs/regex-complexity */
export const TIKTOK_URL_REGEX =
/https:\/\/(?:m|t|www|vm|vt|lite)?\.?tiktok\.com\/(.*\b(?:(?:usr|v|embed|user|video|photo)\/|\?shareId=|&item_id=)(\d+)|\w+)/u;
export const INSTAGRAM_URL_REGEX =
/https?:\/\/(www\.)?instagram\.com\/(p|reel|tv|stories)\/([\w-]+)(\/)?(\?utm_source=ig_web_copy_link&igshid=[a-z0-9]+)?/u;
export const YOUTUBE_URL_REGEX =
/(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([\w-]{11})(?:[?&]\S*)?/u;
export const TAGS = /#[\p{L}\p{N}_]+/gu;