From 399f09bf28d6282d9aba2b7486f54c2d8c92c14d Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 29 Oct 2024 21:54:33 -0700 Subject: [PATCH] Dont need to fix tiktok anymore, they play natively --- app/bot.py | 2 -- app/get_from_reddit.py | 17 ----------------- 2 files changed, 19 deletions(-) diff --git a/app/bot.py b/app/bot.py index a1055822..eeef1d8d 100755 --- a/app/bot.py +++ b/app/bot.py @@ -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", diff --git a/app/get_from_reddit.py b/app/get_from_reddit.py index 5664e5c8..afcc08f7 100755 --- a/app/get_from_reddit.py +++ b/app/get_from_reddit.py @@ -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"]: