# RadioGrab

Do you love listening to the radio?

Are you sick of radio DJ's who won't stop talking?

Look no further, this python script will make a  spotify playlist out of the last 24h of songs played on the radio.

# Getting Started
- Edit the config.yaml file with a text editor and fill in the required values
- Run Main.py using python3
- Once Main.py is run, a browser should open, follow the instructions in the console

# Prequisites
- An internet connection
- Spotify Premium
- Python 3.x
  - [Spotipy](https://pypi.org/project/spotipy/) # NOTE: NEED TO PIP INSTALL THESE 3 THINGS
  - [html2text](https://pypi.org/project/html2text/)  # NOTE: NEED TO PIP INSTALL THESE 3 THINGS
  - [Yaml](https://pypi.org/project/PyYAML/)  # NOTE: NEED TO PIP INSTALL THESE 3 THINGS

# How to obtain a client and secret id  # NOTE: THIS IS IMPORTANT
1. [Create a new app in spotify dashboard](https://developer.spotify.com/dashboard/applications)
2. Locate your apps client id and secret
3. Set your app redirect uri to `http://127.0.0.1:8080` # NOTE: THIS IS IMPORTANT

More help [here](https://developer.spotify.com/documentation/general/guides/authorization-guide/) and [here](https://spotipy.readthedocs.io/en/2.12.0/#authorization-code-flow)

# Installing/Running    # NOTE: NO NEED TO DO THIS PETER
Use git clone to download repository
```
git clone https://github.com/Joseph-33/RadioGrab.git 
```
Input all your spotify details into the config.yaml # NOTE: THIS IS IMPORTANT

Create a spotify playlist (it can be public private or collaborative), place the name of the playlist into the config.yaml # NOTE: THIS IS IMPORTANT

Input your desired radio station and start time into the config.yaml # NOTE: THIS IS IMPORTANT

Run the script with # NOTE: OR RUN Main.py in VS Code

```
python Main.py
```



# Authors
- Joseph Andrews AND OLLIE BEAK


