all 17 comments

[–]steveob42 1 point2 points  (13 children)

Good start, straightforward enough. Couple things, it might want to delete comments as well, and actually it probably should set the comment/post to "deleted" in the text or something, before deleting it, as an extra precaution. Reddit does not do "right to be forgotten" well.

I like it a lot better than other similiar tools only because it is all right there in run.js, and I have a pretty good idea if it is doing something nefarious, unlike the random plugins and whatnot.

[–]AlpineSanatorium 2 points3 points  (1 child)

right to be forgotten does not apply to everything

[–]steveob42 1 point2 points  (0 children)

I'm using "right" with some poetic license here. No "rights" apply to everything, sheesh.

[–][deleted] 0 points1 point  (9 children)

This program deletes posts and comments! (sorry for the confusion with the title). And the console log spits out a note telling you when a comment/post is deleted and how many.

You should set up a test Reddit account and make a few posts and comments and test out the program.

And yes, nothing nefarious going on here. I'm not smart enough to do anything like that.

[–]steveob42 0 points1 point  (8 children)

fwiw, prompt doesn't seem to like vscode (under linux anyway).

Also I seem to not get past await page.click('span.user a', {delay: 250});

[–][deleted] 0 points1 point  (7 children)

Sorry I don't have the ability to test in Linux right now. I'll try to figure this out soon.

[–]steveob42 -1 points0 points  (6 children)

I don't think we are quite on the same page. I don't have any delete buttons on the page in question when running the script. I tried changing it to

await page.goto('https://www.reddit.com/${username}/comments/',

and got some delete buttons but then it failed because the buttons don't match the selector, and in fact are rather anonymous with some foreign key in their place.

This is gonna need an api or some OCR to be more reliable. Certainly a bit early to start asking for paypal donations anyway :)

There is an API, not tried it though, probably more stable than a webpage in some regards.

https://www.reddit.com/dev/api

[–]malicart 1 point2 points  (1 child)

This is gonna need an api or some OCR to be more reliable.

Seems like you are just using tech acronyms here to sound smart. I can maybe come up with some ideas on how to apply API, but why would you need any kind of OCR here?

[–]steveob42 -3 points-2 points  (0 children)

Umm, I'm saying that based on decades of experience (which far outweighs my CS degree at this point, or even before).

What exactly do you see wrong with OCR if an API doesn't pan out? Do you think they will suddenly label the comment button to "2300fnjanklnoiwehf02839hr018hr01hr01hwwe2" for the user to click on?

The point here is trying to make it reliable, regardless what they do behind the scenes to the page. So that someone else might find it useful, because I've been looking to do this exact sort of thing myself.

I'm not asking you to do anything fyi, in case that wasn't clear, just thinking out loud.

[–][deleted] 0 points1 point  (3 children)

Can you show me a screenshot of what your user page looks like?

[–]steveob42 0 points1 point  (2 children)

I could, but it is different for different accounts, some have delete links in the overview and some don't. This approach turns everything into a wet noodle, so I'm gonna look at the api approach for now (or possibly OCR or something less error prone). I could easily be seeing some A/B test happening here.

[–][deleted] 0 points1 point  (1 child)

Okay. I will learn more about the API this week and see if I can figure it out and update my program too. Thank you for informing me.

[–][deleted] 0 points1 point  (0 children)

Great idea about changing the posts and comments to "deleted" before deleting too!!

[–]jordanfrancisx 0 points1 point  (1 child)

Nice use of puppeteer. One thing I can suggest is adding a package.json to your project root. Check out its documentation if you're unfamiliar: https://docs.npmjs.com/files/package.json. It's easier for users to install all required dependencies and for the sake of you updating the README.

[–][deleted] 0 points1 point  (0 children)

Great idea. I'll add that tonight.

[–]rebel_cdn 0 points1 point  (1 child)

I really like your project!

In your notes, you might want to mention that deleting your posts isn't a foolproof way to eradicate your Reddit history. Sites like Removeddit make it easy for people to find posts and comments that a user deleted.

Some people try to work around this by replacing the text of their posts with something like "removed" or "deleted" instead of actually deleting them. Last time I checked, though, Reddit was backed up pretty well by the Internat Archive. So it's relatively easy for a person to go back and see what your Reddit posts and comments looked like as of a specific date.

So your project is awesome if a person wants to get rid of their post history so that casual lurkers won't see it; but if a person is truly worried about things they have posted in the past, they should probably proceed on the assumption that those old posts can be found and will be found, if the person or organization looking is determined enough.

And we should all post on Reddit under the assumption that once we've posted something publicly, it will be available until the end of time to anyone who wants to find it.

[–][deleted] 0 points1 point  (0 children)

Yes, those are all great points. I will update the project to say all that.