Dont need to fix tiktok anymore, they play natively

This commit is contained in:
Luke Robles 2024-10-29 21:54:33 -07:00
parent 021490a9a0
commit 399f09bf28
2 changed files with 0 additions and 19 deletions

View File

@ -93,8 +93,6 @@ async def fix_social_media_links(ctx):
"https://www.x.com": "fixupx", "https://www.x.com": "fixupx",
"https://twitter.com": "fixupx", "https://twitter.com": "fixupx",
"https://www.twitter.com": "fixupx", "https://www.twitter.com": "fixupx",
"https://tiktok.com": "vxtiktok",
"https://www.tiktok.com": "vxtiktok",
"https://www.reddit.com": "rxddit", "https://www.reddit.com": "rxddit",
"https://old.reddit.com": "rxddit", "https://old.reddit.com": "rxddit",
"https://www.instagram.com": "d.ddinstagram", "https://www.instagram.com": "d.ddinstagram",

View File

@ -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 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 # Spoof our user agent with each request so we dont get rate limited
random_user_agent = "".join( random_user_agent = "".join(
random.SystemRandom().choice(string.ascii_uppercase + string.digits) 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} request_string, headers={"User-agent": random_user_agent}
).json()[0]["data"]["children"][0]["data"] ).json()[0]["data"]["children"][0]["data"]
import pprint
pprint.pprint(response, indent=2)
image_url = "https://rxddit.com" + response["permalink"] image_url = "https://rxddit.com" + response["permalink"]
if "youtu.be" in response["url"]: if "youtu.be" in response["url"]: