Add documentation for unsavepost.py
This commit is contained in:
@@ -6,6 +6,7 @@ Due to the verboseness of the logs, a great deal of information can be gathered
|
||||
- [Script to extract all failed download IDs](#extract-all-failed-ids)
|
||||
- [Timestamp conversion](#converting-bdfrv1-timestamps-to-bdfrv2-timestamps)
|
||||
- [Printing summary statistics for a run](#printing-summary-statistics)
|
||||
- [Unsaving posts from your account after downloading](#unsave-posts-after-downloading)
|
||||
|
||||
## Extract all Successfully Downloaded IDs
|
||||
|
||||
@@ -67,3 +68,23 @@ Excluded submissions: 1146
|
||||
Files with existing hash skipped: 0
|
||||
Submissions from excluded subreddits: 0
|
||||
```
|
||||
|
||||
## Unsave Posts After Downloading
|
||||
|
||||
[This script](unsaveposts.py) takes a list of submission IDs from a file named `successfulids` created with the `extract_successful_ids.sh` script and unsaves them from your account. To make it work you will need to make a user script in your reddit profile like this:
|
||||
- Fill in the username and password fields in the script. Make sure you keep the quotes around the fields.
|
||||
- Go to https://old.reddit.com/prefs/apps/
|
||||
- Click on `Develop an app` at the bottom.
|
||||
- Make sure you select a `script` not a `web app`.
|
||||
- Name it `Unsave Posts`.
|
||||
- Fill in the `Redirect URI` field with `127.0.0.0`.
|
||||
- Save it.
|
||||
- Fill in the `client_id` and `client_secret` fields on the script. The client ID is the 14 character string under the name you gave your script. .It'll look like a bunch of random characters like this: pspYLwDoci9z_A. The client secret is the longer string next to "secret". Again keep the quotes around the fields.
|
||||
|
||||
Now the script is ready tu run. Just execute it like this:
|
||||
|
||||
```bash
|
||||
python3.9 -m bdfr download DOWNLOAD_DIR --authenticate --user me --saved --log LOGFILE_LOCATION
|
||||
./extract_successful_ids.sh LOGFILE_LOCATION > successfulids
|
||||
./unsaveposts.py
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user