- cross-posted to:
- gmecanada@lemmy.ca
- cross-posted to:
- gmecanada@lemmy.ca
cross-posted from: https://lemmy.ca/post/1665374
This is a great tool to overwrite your posts with random words and a link to get others to consider doing so as well.
Once my comments are all gone, I’m gonna delete the posts too.
EDIT: …and I’m perma-banned :). Guess they don’t like mentioning lemmy.whynotdrs.org (“… attempting to pillage the community to start another”). Yeah, that’s kinda the point. Buh-bye rexxit.
If you don’t want to trust a third-party service, here’s some really ugly code that I spun up quite a while ago when I still sucked at coding (even though I still do), along with some instructions that I chatGPT’d for it. It doesn’t handle your posts, only comments. I never had enough posts to bother when I could just do it by hand.
Still seems to work even with API restrictions, but maybe that’s because I didn’t hit the limit when I tested it out just now.
Sure, here are the steps you need to follow to use this script to overwrite and delete all comments from your Reddit account:
Prerequisites
This script requires Python and the following Python packages:
requests
,keyring
, andessential_generators
. You can install them using pip:Obtain your Reddit App’s Client ID and Secret
You need a Reddit app’s client ID and secret to use Reddit’s API. To obtain these, follow these steps:
http://localhost:8080
Save Your Client ID, Secret, and Refresh Token in Your Keyring
Use Python’s keyring package to securely save your Reddit app’s client ID, client secret, and Reddit account’s refresh token. You can use the following Python commands to store these values:
import keyring keyring.set_password("YourServiceName", "CLIENT_ID", "YourClientID") keyring.set_password("YourServiceName", "CLIENT_SECRET", "YourClientSecret") keyring.set_password("YourServiceName", "REFRESH_TOKEN", "YourRefreshToken")
Replace
"YourServiceName"
,"YourClientID"
,"YourClientSecret"
, and"YourRefreshToken"
with the actual service name, client ID, client secret, and refresh token. The service name can be any name you choose—it’s just an identifier for you to use.Update the Service Name and Username in the Python Script
Replace
"Redacted"
in the following lines of the Python script with your service name:CLIENT_ID=keyring.get_password("YourServiceName", "CLIENT_ID") CLIENT_SECRET=keyring.get_password("YourServiceName", "CLIENT_SECRET") REFRESH_TOKEN=keyring.get_password("YourServiceName", "REFRESH_TOKEN")
Replace
"(your user name)"
in the following line with your Reddit username:DEFAULT_USERNAME = "(your user name)"
Run the Python Script
After setting up everything, run the Python script. It will fetch all your Reddit comments and overwrite them with random sentences, then delete them.
Please remember, use this script responsibly. It will delete all of your Reddit comments, and the process is irreversible. Always double-check the script and make sure you’re ready to delete all comments before running it.
Nice. If you don’t want to get banned, I’d suggest putting in a long, random sleep right after the call to delete_a_comment() and letting it run over days rather than trying to do them all at once. Unless you want to make a point, I suppose :p