Skip to content

Commit

Permalink
[tumblr] support 'https://www.tumblr.com/BLOGNAME' URLs (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 11, 2022
1 parent b6a68f5 commit 68466a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gallery_dl/extractor/tumblr.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BASE_PATTERN = (
r"(?:tumblr:(?:https?://)?([^/]+)|"
r"(?:https?://)?"
r"(?:www\.tumblr\.com/blog/(?:view/)?([\w-]+)|"
r"(?:www\.tumblr\.com/(?:blog/(?:view/)?)?([\w-]+)|"
r"([\w-]+\.tumblr\.com)))"
)

Expand Down Expand Up @@ -298,6 +298,7 @@ class TumblrUserExtractor(TumblrExtractor):
("tumblr:www.b-authentique.com"),
("https://www.tumblr.com/blog/view/smarties-art"),
("https://www.tumblr.com/blog/smarties-art"),
("https://www.tumblr.com/smarties-art"),
)

def posts(self):
Expand Down Expand Up @@ -354,6 +355,8 @@ class TumblrPostExtractor(TumblrExtractor):
}),
("http://demo.tumblr.com/image/459265350"),
("https://www.tumblr.com/blog/view/smarties-art/686047436641353728"),
("https://www.tumblr.com/blog/smarties-art/686047436641353728"),
("https://www.tumblr.com/smarties-art/686047436641353728"),
)

def __init__(self, match):
Expand Down Expand Up @@ -381,6 +384,8 @@ class TumblrTagExtractor(TumblrExtractor):
"count": 1,
}),
("https://www.tumblr.com/blog/view/smarties-art/tagged/undertale"),
("https://www.tumblr.com/blog/smarties-art/tagged/undertale"),
("https://www.tumblr.com/smarties-art/tagged/undertale"),
)

def __init__(self, match):
Expand All @@ -402,6 +407,8 @@ class TumblrLikesExtractor(TumblrExtractor):
"count": 1,
}),
("https://www.tumblr.com/blog/view/mikf123/likes"),
("https://www.tumblr.com/blog/mikf123/likes"),
("https://www.tumblr.com/mikf123/likes"),
)

def posts(self):
Expand Down

0 comments on commit 68466a7

Please sign in to comment.