Skip to content

Commit

Permalink
[instagram] update pattern for user profile URLs
Browse files Browse the repository at this point in the history
Allow for query parameters and fragments,
for example https://www.instagram.com/instagram/?hl=en
  • Loading branch information
mikf committed Mar 18, 2020
1 parent 2530db3 commit c606d0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -451,6 +451,7 @@ class InstagramUserExtractor(InstagramExtractor):
"range": "1-2",
"count": 2,
}),
("https://www.instagram.com/instagram/?hl=en"),
)

def __init__(self, match):
Expand Down

0 comments on commit c606d0c

Please sign in to comment.