Giter VIP home page Giter VIP logo

reddit_export_userdata's Introduction

reddit_export_userdata

Export userdata from your reddit accounts.

You can export all or any of the following:

  • Own comments and submissions
  • Saved comments and submissions
  • Upvoted comments and submissions

For each one of your accounts, you have to create a reddit script API key and secret API key (see https://www.reddit.com/prefs/apps > new app > script).

Requirements

  • praw
  • pyyaml

Installation

pip install -r requirements.txt

Configuration

For configuration, open the config.example.yaml to see an example on how to fill it.

# Rename this file config.yaml.
users:
    # The four following fields are mandatory.
    - username: username1
      password : password1
      client_id : client_id1
      client_secret : client_secret1
      # At least one export option has to be set.
      exports:
          # Comments made by user.
          - comments
          # Submissions made by user.
          - submissions
          # Submission and comments saved by user.
          - saved
          # Submission and comments upvoted by user.
          - upvoted
    - username: username2
      password : password2
      client_id : client_id2
      client_secret : client_secret2
      exports:
          - saved
options:
    # Each user will have a separate export file.
    separate_export: true
    # Will only export list of urls instead of csv files.
    archivebox_export: true

By default, the script search for a config.yaml config file, but you can use the -c/--config_file argument to use another config file.

Run

python reddit_export_userdata.py

Help

python reddit_export_userdata.py -h
usage: reddit_export_userdata.py [-h] [--debug] [-a] [-s] [-c CONFIG_FILE]

reddit_export_userdata. Exports userdata of one or several reddit accounts.

optional arguments:
  -h, --help            show this help message and exit
  --debug               Display debugging information.
  -a, --archivebox_export
                        Export only urls (old.reddit and www.reddit) in order
                        to be used by archivebox.
  -s, --separate_export
                        Export data in separate files for each reddit users.
  -c CONFIG_FILE, --config_file CONFIG_FILE
                        Path to the config file (default: "config.yaml")

reddit_export_userdata's People

Contributors

dbeley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.