Skip to content

Commit

Permalink
fix: instagram regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Gimenz committed Mar 2, 2024
1 parent bad8934 commit beb8fdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "insta-fetcher",
"version": "1.3.31",
"version": "1.3.32",
"description": "Simplified Instagram metadata scraping",
"main": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const shortcodeFromMediaID = (media_id: string) => {
}

/** Instagram post regex */
export const IGPostRegex = /(?:https?:\/\/)?(?:www\.)?(?:instagram\.com(?:\/.+?)?\/(p|reel(|s)|tv)\/)([\w-]+)(?:\/)?(\?.*)?$/gim
export const IGPostRegex = /(?:https?:\/\/)?(?:www\.)?(?:instagram\.com(?:\/.+?)?\/(p|reel(?:s|)|tv)\/)([\w-]+)(?:\/)?(\?.*)?$/gim

/**
* format instagram long url to get shortcode
Expand Down

0 comments on commit beb8fdf

Please sign in to comment.