Skip to content

Commit

Permalink
fix: regex not detect reel(s) url
Browse files Browse the repository at this point in the history
  • Loading branch information
Gimenz committed Mar 1, 2024
1 parent 09fdea8 commit bad8934
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.3",
"version": "1.3.31",
"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|reels|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 bad8934

Please sign in to comment.