I used to check Metacritic's new releases every time and save the Spotify link of the new albums in my Telegram account, so I automated it
- app.py: the main app to be run
- config.py: parses the configs (not to be changed)
- new_releases.py: fetches the new releases and saves them as well
- public_config.ini: the configurations of the app
- README.md: this file
- requirements.txt: the libraries that app use
- AlbumOBJ.py: contains class for album objects
- JSON_handler.py: handles json files
- Log.py: handles logger
- Spotify_handler.py: handles spotify interactions
- Telegram_handler.py: handles telegram
-
python 3.8 or above, preferrably 3.11 (installed and added to path)
-
pip install -r requirements.txt
-
make a
private_config.ini
file with this structure:[api] bot_token = token_of_your_bot [database] chat_id = the_chat_id_to_send_the_albums_to [spotify] client_id = client_id_of_spotify_app client_secret = client_secret_of_spotify_app
bot_token
-> from BotFatherchat_id
-> from Get My ID or Using the link of the message (if is channel or group)client_id
andclient_secret
-> from Spotify Developer Dashboard -
change
public_config.ini
if needed (not necessary):skip_if_date_dont_match
-> skips the sending of the album if the date doesn't match with the urllog_level
-> debug, info, warning, ...read_webpage_from_file
-> for developement. read the albums from website or the meta filesave_to_webpage_file
-> for development. save the content of webpage to the meta filewebpage_file_name
-> webpages's offline file name (eg meta.html)number_of_fetched_albums
-> between 1 and 50. used in spotify's library to increase the chance of finding the album
python app.py
- Note: You have to manually stop the bot after the links are sent, using CTRL+C then the program asks you to either save the new releases or not (choose yes if everything went well)