Skip to content

Commit

Permalink
[tumblr] replace '-' with ' ' in tag searches (fixes #611)
Browse files Browse the repository at this point in the history
To search for tags with actual minus signs in them
(there shouldn't be too many,) manually replace those
with url-encoded minus characters ('-' -> '%2d')
before inputting them into gallery-dl:

https://s679874.tumblr.com/tagged/tag-with-minus
 ->
https://s679874.tumblr.com/tagged/tag%2dwith%2dminus
  • Loading branch information
mikf committed Feb 17, 2020
1 parent 5cdf1b1 commit d94215d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/extractor/tumblr.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class TumblrTagExtractor(TumblrExtractor):

def __init__(self, match):
TumblrExtractor.__init__(self, match)
self.tag = text.unquote(match.group(3))
self.tag = text.unquote(match.group(3).replace("-", " "))

def posts(self):
return self.api.posts(self.blog, {"tag": self.tag})
Expand Down

0 comments on commit d94215d

Please sign in to comment.