{"id":28332693,"url":"https://github.com/eyeblech/mu5ic-sugg3st","last_synced_at":"2025-07-25T14:11:52.168Z","repository":{"id":249359108,"uuid":"831294977","full_name":"eyeblech/mu5ic-sugg3st","owner":"eyeblech","description":"\"Python script to get notified of a random music to listen to, on Discord, using Spotify API and Discord Webhook.\"","archived":false,"fork":false,"pushed_at":"2024-07-20T07:18:04.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T07:45:10.589Z","etag":null,"topics":["api","notifier","python","recommender-system","service","spotify-api","tools","webhooks"],"latest_commit_sha":null,"homepage":"https://eyeblech.github.io/mu5ic-sugg3st/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyeblech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-20T06:39:48.000Z","updated_at":"2024-07-31T07:02:50.000Z","dependencies_parsed_at":"2024-07-26T05:48:53.677Z","dependency_job_id":null,"html_url":"https://github.com/eyeblech/mu5ic-sugg3st","commit_stats":null,"previous_names":["eyeblech/mu5ic-notify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eyeblech/mu5ic-sugg3st","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyeblech%2Fmu5ic-sugg3st","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyeblech%2Fmu5ic-sugg3st/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyeblech%2Fmu5ic-sugg3st/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyeblech%2Fmu5ic-sugg3st/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyeblech","download_url":"https://codeload.github.com/eyeblech/mu5ic-sugg3st/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyeblech%2Fmu5ic-sugg3st/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267017905,"owners_count":24022151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","notifier","python","recommender-system","service","spotify-api","tools","webhooks"],"created_at":"2025-05-26T19:58:29.199Z","updated_at":"2025-07-25T14:11:52.161Z","avatar_url":"https://github.com/eyeblech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Introduction\n\n\"Python script to get notified of a random music to listen to, on Discord, using Spotify API and Discord Webhook.\"\n\n# Getting Started\n\n\n## Step 1: Set up a Discord Webhook\n* Open your Discord server.\n\n* Go to Server Settings \u003e Integrations \u003e Webhooks.\n\n* Click \"New Webhook\" and customize it as you like.\n\n* Copy the Webhook URL.\n\n## Step 2: Set Up Spotify API Access\n* Create a Spotify Developer Account:\n\n* Go to the Spotify Developer Dashboard and log in with your Spotify account.\n  Create a New Spotify App:\n\n* Click \"Create an App\" and fill in the required fields (App name, App   description, etc)\n* After creating the app, you'll receive a \"Client ID\" and \"Client Secret.\" Save these credentials.\n### Get Access Token:\n\n* Use the Spotify Web API Console or the Authorization Code Flow to get an access token.\n* For simplicity, you can manually obtain a token via the Web API Console:\n* Go to the Spotify Web API Console.\n  Log in with your Spotify account and click \"Get Token\" to authorize and get an   access token.\n\n```sh\ncurl -X POST \"https://accounts.spotify.com/api/token\" \\\n     -H \"Content-Type: application/x-www-form-urlencoded\" \\\n     -d \"grant_type=client_credentials\u0026client_id=your-client-id\u0026client_secret=your-client-secret\"\n\n```\n* replace the client_id and client_secret before sending the request to get your access token\n\n## Step 3: Preparing the Python Script\n* Install required libraries \n\n```sh\npip install requests\n```\n* copy the python script and make a new python file `song-notifier.py`\n\n\n* Replace Placeholder Values\n\n  Open the `song-notifier.py` file and replace\n\n  `client_id`, `client_secret`,`access_token` and \n  `YOUR_DISCORD_WEBHOOK_URL`\n\n* you can always modify the genre e.g `metal,rock,pop,rap,country e.t.c`, to get recommended, genre specified songs\n\n\n![genre](https://github.com/user-attachments/assets/dc172486-8e65-43f3-97d8-2014b7e201f1)\n\n\n\n## Running locally/cloud\n\n* You can use Google Console , AWS or Heroku e.t.c\n* \"Instead, you choose to run it locally, create a cron job so that it can automatically run at specified intervals of time.\"\n\n```sh\ncrontab -e\n```\n```sh\n0 */8 * * * /usr/bin/python /home/samsep10l/Desktop/song-notifier.py\n```\n\n* to list cron jobs\n```sh\ncrontab -l\n```\n\n\n![python](https://github.com/user-attachments/assets/1e63fbe7-f187-4801-9fad-63be961d68bd)\n\n\n![notify](https://github.com/user-attachments/assets/ec5031e7-aeab-46e0-a6f0-4d5d03ba8e48)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyeblech%2Fmu5ic-sugg3st","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyeblech%2Fmu5ic-sugg3st","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyeblech%2Fmu5ic-sugg3st/lists"}