[tenor] support '/official/' user URLs (#6075)
This commit is contained in:
@@ -140,7 +140,7 @@ class TenorSearchExtractor(TenorExtractor):
|
||||
class TenorUserExtractor(TenorExtractor):
|
||||
subcategory = "user"
|
||||
directory_fmt = ("{category}", "@{user[username]}")
|
||||
pattern = BASE_PATTERN + r"users/([^/?#]+)"
|
||||
pattern = BASE_PATTERN + r"(?:users|official)/([^/?#]+)"
|
||||
example = "https://tenor.com/users/USER"
|
||||
|
||||
def gifs(self):
|
||||
|
||||
@@ -126,4 +126,29 @@ __tests__ = (
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://tenor.com/official/rwrbonprime",
|
||||
"#class": tenor.TenorUserExtractor,
|
||||
"#range": "1",
|
||||
|
||||
"user": {
|
||||
"avatars" : dict,
|
||||
"flags" : ["partner"],
|
||||
"partnerbanner": dict,
|
||||
"partnercategories": [],
|
||||
"partnercta" : {
|
||||
"text": "Learn More",
|
||||
"url" : "https://www.amazon.com/dp/B0BYSWHGB9",
|
||||
},
|
||||
"partnerlinks" : list,
|
||||
"partnername" : "Red, White & Royal Blue",
|
||||
"profile_id" : "9116468280322048077",
|
||||
"tagline" : "Love is about to get royally complicated",
|
||||
"url" : "https://tenor.com/official/RWRBonPrime",
|
||||
"userid" : "0",
|
||||
"username" : "RWRBonPrime",
|
||||
"usertype" : "partner",
|
||||
},
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user