0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-19 05:29:59 +00:00

[ie/instagram] Support share URLs (#11677)

Closes #11630
Authored by: grqz
This commit is contained in:
N/Ame 2024-12-02 03:16:50 +13:00 committed by GitHub
parent 00dcde7286
commit 360aed810a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -254,7 +254,7 @@ def _real_extract(self, url):
class InstagramIE(InstagramBaseIE): class InstagramIE(InstagramBaseIE):
_VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com(?:/[^/]+)?/(?:p|tv|reels?(?!/audio/))/(?P<id>[^/?#&]+))' _VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com(?:/(?!share/)[^/?#]+)?/(?:p|tv|reels?(?!/audio/))/(?P<id>[^/?#&]+))'
_EMBED_REGEX = [r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1'] _EMBED_REGEX = [r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?instagram\.com/p/[^/]+/embed.*?)\1']
_TESTS = [{ _TESTS = [{
'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc', 'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc',