Recently I’ve been working a bit with the reddit api and have made a basic python script for grabbing info off reddit through the api. You can check out the script on my github (link). It currently has basic functionality for authorization and cookie handling and will grab a user’s info.
Before using and modifying you should pay attention to the reddit’s api rules and reddit’s general rules. Specially, make fewer than one request per two seconds, don’t lie about your user-agent and no “vote cheating”. Reddit has implemented anti-cheating and anti-spam code which is not available on their repo which detects misuse. It will find you and will ban you.
To get up and running you’ll need to setup a dv_settings.json file which contains the account information for login and target username. Here is an example:
{
"account": {
"username": "user123",
"password": "password123"
},
"target": "targetusername",
"user-agent": "reddit info grabber v0.1"
}
The script also needs write access to the filesystem to create the cookies file.
Have fun!