From d83ca261f75f483a77d09d4f24abb52cd5dfa029 Mon Sep 17 00:00:00 2001 From: Ed Linklater Date: Wed, 5 Aug 2020 21:37:48 +0200 Subject: [PATCH] [instagram] Add support for Reels --- youtube_dl/extractor/instagram.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py index b061850a1..fe6ee8acc 100644 --- a/youtube_dl/extractor/instagram.py +++ b/youtube_dl/extractor/instagram.py @@ -22,7 +22,7 @@ from ..utils import ( class InstagramIE(InfoExtractor): - _VALID_URL = r'(?Phttps?://(?:www\.)?instagram\.com/(?:p|tv)/(?P[^/?#&]+))' + _VALID_URL = r'(?Phttps?://(?:www\.)?instagram\.com/(?:p|tv|reel)/(?P[^/?#&]+))' _TESTS = [{ 'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc', 'md5': '0d2da106a9d2631273e192b372806516', @@ -35,7 +35,7 @@ class InstagramIE(InfoExtractor): 'timestamp': 1371748545, 'upload_date': '20130620', 'uploader_id': 'naomipq', - 'uploader': 'Naomi Leonor Phan-Quang', + 'uploader': 'B E A U T Y F O R A S H E S', 'like_count': int, 'comment_count': int, 'comments': list, @@ -86,6 +86,19 @@ class InstagramIE(InfoExtractor): 'title': 'Post by instagram', 'description': 'md5:0f9203fc6a2ce4d228da5754bcf54957', }, + }, { + # reels + 'url': 'https://www.instagram.com/reel/CDg_6Y1pxWu/', + 'info_dict': { + 'id': 'CDg_6Y1pxWu', + 'ext': 'mp4', + 'title': 'Video by mileycyrus', + 'thumbnail': r're:^https?://.*\.jpg', + 'timestamp': 1596647638, + 'upload_date': '20200805', + 'uploader_id': 'mileycyrus', + 'uploader': 'Miley Cyrus', + }, }, { 'url': 'https://instagram.com/p/-Cmh1cukG2/', 'only_matching': True,