[simpcity] extract 'reddit' media embeds (#8994)
This commit is contained in:
@@ -362,9 +362,11 @@ class XenforoExtractor(BaseExtractor):
|
||||
continue
|
||||
|
||||
type = data.get("data-s9e-mediaembed")
|
||||
frag = src[src.find("#")+1:]
|
||||
if type == "tiktok":
|
||||
url = ("https://www.tiktok.com/@/video/" +
|
||||
src[src.rfind("#")+1:])
|
||||
url = "https://www.tiktok.com/@/video/" + frag
|
||||
elif type == "reddit":
|
||||
url = "https://embed.reddit.com/r/" + frag
|
||||
else:
|
||||
self.log.warning("%s: Unsupported media embed type '%s'",
|
||||
post["id"], type)
|
||||
|
||||
@@ -249,6 +249,15 @@ __tests__ = (
|
||||
"#results" : "https://www.tiktok.com/@/video/7556556034794425631",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://simpcity.cr/threads/alrightsierra.70601/post-571509",
|
||||
"#comment" : "reddit s9e media embed iframe (#8996)",
|
||||
"#category": ("xenforo", "simpcity", "post"),
|
||||
"#class" : xenforo.XenforoPostExtractor,
|
||||
"#auth" : True,
|
||||
"#results" : "https://embed.reddit.com/r/TikTokFeet/comments/rtzwnz#theme=auto",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://simpcity.cr/threads/alua-tatakai.89490/",
|
||||
"#category": ("xenforo", "simpcity", "thread"),
|
||||
|
||||
Reference in New Issue
Block a user