@@ -0,0 +1,1622 @@
+%22%22%22%0ADelete all saved posts / comments on your reddit account with PRAW.%0ASee: https://plh.io/automation/delete-all-saved-reddit-links%0ANeeds Python 3+ and Praw 5.3.0%0A%22%22%22%0Aimport argparse%0Aimport praw%0A%0A%0Adef create_parser():%0A    %22%22%22Create command line argument parser%22%22%22%0A    parser = argparse.ArgumentParser(description=%22%22)%0A    parser.add_argument(%22client_id%22, metavar=%22CLIENT_ID%22,%0A                        help=%22client_id for PRAW%22)%0A    parser.add_argument(%22client_secret%22, metavar=%22CLIENT_SECRET%22,%0A                        help=%22client_secret for PRAW%22)%0A    parser.add_argument(%22password%22, metavar=%22PASSWORD%22,%0A                        help=%22Reddit password%22)%0A    parser.add_argument(%22username%22, metavar=%22USERNAME%22,%0A                        help=%22Reddit username%22)%0A%0A    return parser%0A%0A%0Adef run_praw(client_id, client_secret, password, username):%0A    %22%22%22%0A    Delete all saved reddit posts for username%0A    CLIENT_ID and CLIENT_SECRET come from creating a developer app on reddit%0A    %22%22%22%0A    user_agent = %22/u/%7B%7D delete all saved entries%22.format(username)%0A    r = praw.Reddit(client_id=client_id, client_secret=client_secret,%0A                    password=password, username=username,%0A                    user_agent=user_agent)%0A%0A    saved = r.user.me().saved(limit=None)%0A    for s in saved:%0A        try:%0A            s.unsave()%0A        except AttributeError as err:%0A            print(err)%0A%0A%0Adef main():%0A    %22%22%22 Run the program %22%22%22%0A    parser = create_parser()%0A    args = parser.parse_args()%0A    # print(args.password)%0A    run_praw(args.client_id, args.client_secret, args.password, args.username)%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()

Remove saved reddit items