[tumblr:search] fix 'ValueError: not enough values to unpack' (#8079)
fixes regression introduced in 21160a8b08
This commit is contained in:
@@ -382,7 +382,7 @@ class TumblrSearchExtractor(TumblrExtractor):
|
|||||||
example = "https://www.tumblr.com/search/QUERY"
|
example = "https://www.tumblr.com/search/QUERY"
|
||||||
|
|
||||||
def posts(self):
|
def posts(self):
|
||||||
_, _, _, search, mode, post_type, query = self.groups
|
search, mode, post_type, query = self.groups
|
||||||
params = text.parse_query(query)
|
params = text.parse_query(query)
|
||||||
return self.api.search(text.unquote(search), params, mode, post_type)
|
return self.api.search(text.unquote(search), params, mode, post_type)
|
||||||
|
|
||||||
|
|||||||
@@ -381,28 +381,33 @@ __tests__ = (
|
|||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.tumblr.com/search/nathan fielder",
|
"#url" : "https://www.tumblr.com/search/nathan fielder",
|
||||||
"#category": ("", "tumblr", "search"),
|
|
||||||
"#class" : tumblr.TumblrSearchExtractor,
|
"#class" : tumblr.TumblrSearchExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.tumblr.com/search/nathan fielder/recent/quote?src=typed_query",
|
"#url" : "https://www.tumblr.com/search/nathan fielder/recent/quote?src=typed_query",
|
||||||
"#category": ("", "tumblr", "search"),
|
|
||||||
"#class" : tumblr.TumblrSearchExtractor,
|
"#class" : tumblr.TumblrSearchExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.tumblr.com/search/nathan%20fielder?t=90",
|
"#url" : "https://www.tumblr.com/search/nathan%20fielder?t=90",
|
||||||
"#category": ("", "tumblr", "search"),
|
|
||||||
"#class" : tumblr.TumblrSearchExtractor,
|
"#class" : tumblr.TumblrSearchExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://tumblr.com/search/nathan%20fielder?t=90",
|
"#url" : "https://tumblr.com/search/nathan%20fielder?t=90",
|
||||||
"#category": ("", "tumblr", "search"),
|
|
||||||
"#class" : tumblr.TumblrSearchExtractor,
|
"#class" : tumblr.TumblrSearchExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.tumblr.com/search/Sonic?src=typed_query",
|
||||||
|
"#class" : tumblr.TumblrSearchExtractor,
|
||||||
|
"#options" : {"original": False},
|
||||||
|
"#pattern" : r"https://\w+\.media\.tumblr\.com/.{10,}.\w+",
|
||||||
|
"#range" : "1-10",
|
||||||
|
"count" : range(1, 10),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.tumblr.com/mikf123/following",
|
"#url" : "https://www.tumblr.com/mikf123/following",
|
||||||
"#class" : tumblr.TumblrFollowingExtractor,
|
"#class" : tumblr.TumblrFollowingExtractor,
|
||||||
|
|||||||
Reference in New Issue
Block a user