diff options
author | Amir Y. Perehodnik <myrprhwdnyq@gmail.com> | 2024-05-23 07:07:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 06:07:20 +0200 |
commit | 06cb0638392b607b47d3c2ac48eb2ebecb0f060d (patch) | |
tree | 7f44fa0339147efafcf4593de0339e44bcb5470d | |
parent | 296df0da1d38a44d34c99b60a18066c301774537 (diff) |
[ie/Instagram] Support `/reels/` URLs (#9539)
Closes #6689
Authored by: amir16yp
-rw-r--r-- | yt_dlp/extractor/instagram.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/extractor/instagram.py b/yt_dlp/extractor/instagram.py index f7f21505e..46f9cd681 100644 --- a/yt_dlp/extractor/instagram.py +++ b/yt_dlp/extractor/instagram.py @@ -255,7 +255,7 @@ class InstagramIOSIE(InfoExtractor): 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', @@ -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 |