Migrate old Reddit account's subreddits and saved posts to fresh Reddit account.
Using a virtual environment in an Anaconda Prompt is a good way to simplify Python package management and deployment. Here is a link that can help you set up Anaconda and Python. If you have a preferred package management tool, feel free to use that instead.
Creating and entering a virtual environment in Anaconda:
conda create --name reddit-migration python=3.7
conda activate reddit-migration
Praw has good documentation on using the Reddit API. Here is their Quick Start guide. We will be using an OAuth authentication method called Password Flow.
Collect the necessary information - Client ID, Client Secret, User Agent, and the username and password of a Reddit account. Avoid displaying your Reddit account and API credentials in a public repository!
- Go to https://www.reddit.com/prefs/apps/
- Click on the 'are you a developer? create an app...' button.
- Fill in the info.
- Use the provided info. The client ID is at least a 14-character string listed just under “personal use script” for the desired developed application. The client secret is at least a 27-character string listed next to "secret" for the application. For user_agent, write something descriptive like "Migrating between two user accounts by /u/myusernamehere".