Skip to content

Commit

Permalink
[ie/Instagram] Support /reels/ URLs (#9539)
Browse files Browse the repository at this point in the history
Closes #6689
Authored by: amir16yp
  • Loading branch information
amir16yp committed May 23, 2024
1 parent 296df0d commit 06cb063
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yt_dlp/extractor/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def _real_extract(self, url):


class InstagramIE(InstagramBaseIE):
_VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com(?:/[^/]+)?/(?:p|tv|reel)/(?P<id>[^/?#&]+))'
_VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com(?:/[^/]+)?/(?:p|tv|reels?(?!/audio/))/(?P<id>[^/?#&]+))'
_EMBED_REGEX = [r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1']
_TESTS = [{
'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc',
Expand Down Expand Up @@ -379,6 +379,9 @@ class InstagramIE(InstagramBaseIE):
}, {
'url': 'https://www.instagram.com/marvelskies.fc/reel/CWqAgUZgCku/',
'only_matching': True,
}, {
'url': 'https://www.instagram.com/reels/Cop84x6u7CP/',
'only_matching': True,
}]

@classmethod
Expand Down

0 comments on commit 06cb063

Please sign in to comment.