[-] [email protected] 3 points 9 hours ago

Mongolia is a rabbit hole of weird facts

31
submitted 11 hours ago by [email protected] to c/[email protected]
[-] [email protected] 7 points 5 days ago

Well I guess when there's a species of giant people eating gum-chewers we really should have expected a decline in its popularity

[-] [email protected] 3 points 5 days ago

There's quite a dissonance between this post's title and body

[-] [email protected] 5 points 6 days ago

I think most people would agree on the surface but the devil's in the details: that statement could mean anything from making schedule 1 drugs available at detox centers to removing prescription requirements on antibiotics to grabbing a bag of ricin at the corner store on your way to work

198
submitted 3 weeks ago by [email protected] to c/[email protected]
[-] [email protected] 33 points 2 months ago

Wait until people find out how fast electric cars actually are

[-] [email protected] 57 points 2 months ago

Just noting something that helped me (when receiving calls, especially for work): changing my ringtone to the Pokémon battle music

Now a call is something to be defeated!

Yeah, it's stupid but at least it's also dumb

[-] [email protected] 61 points 2 months ago

Not sure if Poland is Hell or Hell is Polish

[-] [email protected] 34 points 4 months ago

It's uncanny how the black knight skit perfectly summarizes Russian military doctrine

[-] [email protected] 31 points 4 months ago

He really does know how to keep yall pushing their SEO score higher

[-] [email protected] 37 points 5 months ago
[-] [email protected] 51 points 6 months ago

Snake oil salesman

[-] [email protected] 39 points 7 months ago

Anybody who thinks this is funny isn't considering the banker underwriting a loan using an NFT as collateral; it's actually hilarious

1
submitted 8 months ago by [email protected] to c/[email protected]

You'll need to update the praw.Reddit() parameters and set booleans to True based on what you want to have cleared.

This also overwrites your comments with nonsense content seeing as Reddit doesn't really delete your comments if nobody forces them

Sorry about the amateurish Python, this isn't my go-to language

import praw

#Update all values set to XXXXXX and set boolean values to True for whatever you'd like to clear

reddit = praw.Reddit(
    client_id="XXXXXX",
    client_secret="XXXXXX",
    user_agent="script running locally", #required for PRAW but not sure content matters
    username="XXXXXX",
    password="XXXXXX"
)

#booleans
delete_posts = False
delete_comments = False
delete_saved = False
clear_votes = False
unsubscribe = False

def get_posts():
    return reddit.user.me().submissions.new(limit=100)

def get_comments():
    return reddit.user.me().comments.new(limit=100)

def get_subscriptions():
    return reddit.user.subreddits()

def get_saved_items():
    return reddit.user.me().saved(limit=100)

def get_upvoted():
    return reddit.user.me().upvoted(limit=100)

def get_downvoted():
    return reddit.user.me().downvoted(limit=100)

while(clear_votes):
    count = 0
    upvotes = get_upvoted()
    downvotes = get_downvoted()
    for vote in upvotes:
        try:
            vote.clear_vote()
            count += 1
            print('Clearing vote for: ', vote)
        except Exception as e:
            print('Could not clear vote due to: ', e, '(this is normal for archived posts)')
            continue
    for vote in downvotes:
        try:
            vote.clear_vote()
            count += 1
            print('Clearing vote for: ', vote)
        except Exception as e:
            print('Could not clear vote due to: ', e, '(this is normal for archived posts)')
            continue
    if(count == 0):
        clear_votes = False

while(delete_saved):
    count = 0
    saved_items = get_saved_items()
    for item in saved_items:
        item.unsave()
        count += 1
        print('Unsaved item ID: ', item)
    if(count == 0):
        delete_saved = False


while(delete_posts):
    count = 0
    posts = get_posts()
    for post in posts:
        print("Deleting submission: ", post)
        post.delete()
        count += 1
    if(count == 0): 
        delete_posts = False 


#Replace comments with nonsense data first as Reddit only "marks comments as" deleted
while(delete_comments):
    count = 0
    comments = reddit.user.me().comments.new(limit=1000)
    print("Replacing comments with nonsense data")
    for comment in comments:
       comment.edit('So long and thanks for all the fish')
    print("Deleting comments")
    for comment in comments:
        comment.delete()
        count+=1
    if (count == 0):
        delete_comments = False

while(unsubscribe):
    count = 0
    subscriptions = get_subscriptions()
    for subreddit in subscriptions:
        subreddit.unsubscribe()
        count += 1
        print('Unsubscribed from: ', subreddit.display_name)
    if (count == 0):
        unsubscribe = False

print('--finished--')
view more: next ›

JackLSauce

joined 8 months ago