Git Product home page Git Product logo

reddit-api's Introduction

Reddit API

Reddit API is a Python Class, that lets you easely establish a connection to the Reddit Api. The idea behind this is to dowload Images, Animated Images and Videos from Reddit Posts.

The script test.py is a Script which you can use to test out the functions of the redditApi Class

Features

request_posts This Function within the redditApi class lets you get between 1 and 100 posts from any subreddit and returns a list of Dictionaries, which contain the Post ID, Image url and Post Title.

request_random This Function within the redditApi class lets you get a random Post from any subreddit and returns a list of one Dictionary, which contain the Post ID, Image url and Post Title.

subreddit_exists This Function checks if a given Subreddit exists

get_url This Function within the redditApi class lets you get a the Image url from any specific Post and returns a list of one Dictionary, which contain the Post ID, Image url and Post Title.

get_header Return you the Header Information for you to make further Requests

Setup

Steps you need to complete before you can use these Scripts

Config File

username Your Reddit Account Username

password Your Reddit Account Password

client_id The Application ID of your Reddit Application

secret The Secret of your Reddit Apllication

Reddit Application Create your own Reddit Application on the following Website: https://www.reddit.com/prefs/apps

asasfasrf

Python Libraries

When Installing Python 3.10.4 most of the Modules used in this Script will be pre Installed

requests Download the requests module using the command: pip install requests in the console

reddit-api's People

Contributors

zueripat avatar

Watchers

 avatar

reddit-api's Issues

Bug report

Guten Tag!

Wenn ich das Script laufe lasse, läuft es erst problemlos....Nach einer Zeit hört es Radom auf ein Subreddit zu herunterladen (hört auf beim z.B. 16 von 50 Bilder/Videos herunterladen). Wenn ich das Script nochmals "Neustarte" dann geht es wieder, doch nach einer Zeit kommt das selbe Problem bei einem anderem Subreddit und so weiter...

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.