Simple API for Reddit built using BeautifulSoup and Flask in Python.
- Make sure you have python3 installed.
- Now we install pip as it makes it easier to download the latest version of Flask and BeautifulSoup globally. Execute the following command.
$ sudo apt-get install python3-pip
- Now we install a virtual environment using pip3
$ sudo pip3 install virtualenv
- Clone this repo and cd into it.
$ git clone https://github.com/Ashwin-Nikam/RedditAPI.git
$ cd RedditAPI
- Run the virtual environment and install all required files
$ source venv/bin/activate
$ pip3 install -r requirements.txt
- Now that venv is running, we have all the necessary libraries installed. We can now run the server by executing the following command:
$ python3 Main.py
- Now that the server is running open any internet browser and type in the following URL:
http://127.0.0.1:5000
- You'll be taken to the welcome page of this basic API.
http://127.0.0.1:5000/gethot
http://127.0.0.1:5000/gettop
http://127.0.0.1:5000/getrising