Giter Site home page Giter Site logo

redditpurge.py's People

Contributors

chrisshiplet avatar

Watchers

 avatar  avatar

redditpurge.py's Issues

Doesn't work with reddit's current API access rules.

For anyone who faced the same problem, here is a simple solution using PRAW.

#!/usr/bin/env python3

import praw

client_id = CLIENT_ID
client_secret = CLIENT_SECRET
username = USER_NAME
password = USER_PASSWORD
user_agent = 'redditPurge.py by ' + username

reddit = praw.Reddit(client_id=client_id,
                     client_secret=client_secret,
                     username=username,
                     password=password,
                     user_agent=user_agent)
reddit.validate_on_submit = True

me = reddit.user.me()

is_empty = False
while not is_empty:
    is_empty = True
    for submission in me.submissions.new(limit=None):
        is_empty = False
        submission.delete()

is_empty = False
while not is_empty:
    is_empty = True
    for comment in me.comments.new(limit=None):
        is_empty = False
        comment.edit("deleted")
        comment.delete()

Replace the capitalized parts with your credentials. You can get a client_id and a client_secret from here. This will then remove all your submissions and all your comments after overwriting them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.