Archive a reddit user's post history. Formatted overview of a profile, JSON containing every post, and picture downloads.
Project description
redditsfinder
pip3 install redditsfinder
A command line program to easily download reddit users' post histories.
Get any reddit user's entire post history with one command while avoiding the reddit API's 1000 post limit.
The main meat of this program is making the requests to pushshift and manipulating pushshift's JSON for a more readable all_posts.json file.
There is also a handly image downloader I made that avoids a lot of the problems of trying to grab multiple images from different sites at once. Things like file types being not what the file is encoded as, and changed URLs. Or a URL that ends with .png that returns ASCII text. It gets imgur albums along with images, because at least for a while imgur was essentially reddit's non-official image hosting service.
The colored terminal features and markup are from https://github.com/willmcgugan/rich
pip3 install rich
which is one the coolest python packages I've seen. It's very easy to pick up, but as is shown with the animated example in its README, still has a lot of depth.
https://github.com/LoLei/redditcleaner pip3 install redditcleaner
was also a massive help for dealing with reddit's strange markup.
Comments and self-posts can be unreadable when put in another format like JSON if they have a fair amount of formatting.
To deal with it, I gave up and looked online for an alternative. Luckily there was a good one readily available.
Installation
pip3 install redditsfinder
Running redditsfinder
Test it on yourself to make sure it works.
redditsfinder yourusername
Basic usage
Returns every post to a different JSON file for each user and formats a table in the terminal for a quick view.
Takes an arbitrary number of user names, such that there is at least one user name.
redditsfinder username
redditsfinder [options] username_0 username_1 username_2 ...
With a file
Uses user names from a file.
-f
or --file
redditsfinder [options] -f line_separated_text_file.txt
Optional args
-pics
returns URLs of image uploads.
-pics -d
or -pics --download
downloads them.
-q
or --quiet
turns off non log related print statements.
Example terminal table
Example use of -pics -d
Example JSON object
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Redditsfinder-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffc527275fc293e4d46b85f3ed6ed97d3b69ec27c9e0187465c8ac3541c7a30c |
|
MD5 | b54a7e0faa9c2cbe2dfe9e1c7ab9eac5 |
|
BLAKE2b-256 | 2fcd6ce35ba043acfebce421ee66cb598f08c8931ea7bb16a9023900cf7ba2f4 |