Dont need to fix tiktok anymore, they play natively
This commit is contained in:
parent
021490a9a0
commit
399f09bf28
@ -93,8 +93,6 @@ async def fix_social_media_links(ctx):
|
||||
"https://www.x.com": "fixupx",
|
||||
"https://twitter.com": "fixupx",
|
||||
"https://www.twitter.com": "fixupx",
|
||||
"https://tiktok.com": "vxtiktok",
|
||||
"https://www.tiktok.com": "vxtiktok",
|
||||
"https://www.reddit.com": "rxddit",
|
||||
"https://old.reddit.com": "rxddit",
|
||||
"https://www.instagram.com": "d.ddinstagram",
|
||||
|
@ -11,19 +11,6 @@ def get_image(boards, nsfw=False):
|
||||
as long as it is hosted on one of the domains in the domains list
|
||||
"""
|
||||
|
||||
domains = [
|
||||
"cdn.awwni.m",
|
||||
"gfycat.com",
|
||||
"i.imgur.com",
|
||||
"i.redd.it",
|
||||
"i.reddituploads.com",
|
||||
"i3.kym-cdn.com",
|
||||
"imgur.com",
|
||||
"media.giphy.com",
|
||||
"v.redd.it",
|
||||
"reddit.com",
|
||||
]
|
||||
|
||||
# Spoof our user agent with each request so we dont get rate limited
|
||||
random_user_agent = "".join(
|
||||
random.SystemRandom().choice(string.ascii_uppercase + string.digits)
|
||||
@ -43,10 +30,6 @@ def get_image(boards, nsfw=False):
|
||||
request_string, headers={"User-agent": random_user_agent}
|
||||
).json()[0]["data"]["children"][0]["data"]
|
||||
|
||||
import pprint
|
||||
|
||||
pprint.pprint(response, indent=2)
|
||||
|
||||
image_url = "https://rxddit.com" + response["permalink"]
|
||||
|
||||
if "youtu.be" in response["url"]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user