From c606d0c854574dab7d5d2f9f6aa14a36c7a63ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 18 Mar 2020 22:24:20 +0100 Subject: [PATCH] [instagram] update pattern for user profile URLs Allow for query parameters and fragments, for example https://www.instagram.com/instagram/?hl=en --- gallery_dl/extractor/instagram.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/instagram.py b/gallery_dl/extractor/instagram.py index c6ca3f3f..194584a2 100644 --- a/gallery_dl/extractor/instagram.py +++ b/gallery_dl/extractor/instagram.py @@ -439,7 +439,7 @@ class InstagramUserExtractor(InstagramExtractor): subcategory = "user" pattern = (r"(?:https?://)?(?:www\.)?instagram\.com" r"/(?!p/|explore/|directory/|accounts/|stories/|tv/)" - r"([^/?&#]+)/?$") + r"([^/?&#]+)/?(?:$|[?#])") test = ( ("https://www.instagram.com/instagram/", { "range": "1-16", @@ -451,6 +451,7 @@ class InstagramUserExtractor(InstagramExtractor): "range": "1-2", "count": 2, }), + ("https://www.instagram.com/instagram/?hl=en"), ) def __init__(self, match):