Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"display_format": "Twitter • {0}"
},
"Instagram": {
"patterns": [r"instagram\.com/(?:p|reel)/([\w-]+)"],
"patterns": [r"instagram\.com/(?:p|reels?)/([\w-]+)"],
"base_url": "fixembed.app",
"display_format": "Instagram • {0}"
},
Expand Down
1 change: 1 addition & 0 deletions service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Direct URL patterns for easy use:
GET /twitter/{user}/status/{id}
GET /instagram/p/{shortcode}
GET /instagram/reel/{shortcode}
GET /instagram/reels/{shortcode}
GET /threads/@{username}/post/{shortcode}
GET /bluesky/profile/{handle}/post/{id}
GET /reddit/r/{subreddit}/comments/{id}
Expand Down
1 change: 1 addition & 0 deletions service/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Direct URL patterns for easy use:
GET /twitter/{user}/status/{id}
GET /instagram/p/{shortcode}
GET /instagram/reel/{shortcode}
GET /instagram/reels/{shortcode}
GET /threads/@{username}/post/{shortcode}
GET /bluesky/profile/{handle}/post/{id}
GET /reddit/r/{subreddit}/comments/{id}
Expand Down
3 changes: 1 addition & 2 deletions service/src/handlers/instagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ export const instagramHandler: PlatformHandler = {
name: 'instagram',
patterns: [
/instagram\.com\/p\/([^\/\?]+)/i,
/instagram\.com\/reel\/([^\/\?]+)/i,
/instagram\.com\/reels\/([^\/\?]+)/i,
/instagram\.com\/reels?\/([^\/\?]+)/i,
/instagram\.com\/tv\/([^\/\?]+)/i,
/instagram\.com\/stories\/([^\/]+)\/(\d+)/i,
/instagram\.com\/share\/(p|reel)\/([^\/\?]+)/i,
Expand Down
3 changes: 1 addition & 2 deletions service/src/src/handlers/instagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ export const instagramHandler: PlatformHandler = {
name: 'instagram',
patterns: [
/instagram\.com\/p\/([^\/\?]+)/i,
/instagram\.com\/reel\/([^\/\?]+)/i,
/instagram\.com\/reels\/([^\/\?]+)/i,
/instagram\.com\/reels?\/([^\/\?]+)/i,
/instagram\.com\/tv\/([^\/\?]+)/i,
/instagram\.com\/stories\/([^\/]+)\/(\d+)/i,
/instagram\.com\/share\/(p|reel)\/([^\/\?]+)/i,
Expand Down
2 changes: 1 addition & 1 deletion service/src/src/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function parseRedditUrl(url: string): { subreddit: string; postId: string
export function parseInstagramUrl(url: string): { shortcode: string; type: 'post' | 'reel' | 'story' } | null {
const patterns = [
{ pattern: /instagram\.com\/p\/([^\/\?]+)/i, type: 'post' as const },
{ pattern: /instagram\.com\/reel\/([^\/\?]+)/i, type: 'reel' as const },
{ pattern: /instagram\.com\/reels?\/([^\/\?]+)/i, type: 'reel' as const },
{ pattern: /instagram\.com\/stories\/[^\/]+\/(\d+)/i, type: 'story' as const },
];

Expand Down
2 changes: 1 addition & 1 deletion service/src/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function parseRedditUrl(url: string): { subreddit: string; postId: string
export function parseInstagramUrl(url: string): { shortcode: string; type: 'post' | 'reel' | 'story' } | null {
const patterns = [
{ pattern: /instagram\.com\/p\/([^\/\?]+)/i, type: 'post' as const },
{ pattern: /instagram\.com\/reel\/([^\/\?]+)/i, type: 'reel' as const },
{ pattern: /instagram\.com\/reels?\/([^\/\?]+)/i, type: 'reel' as const },
{ pattern: /instagram\.com\/stories\/[^\/]+\/(\d+)/i, type: 'story' as const },
];

Expand Down