Giter VIP home page Giter VIP logo

nova-boop's Introduction

Nova Boop

Nova Boop is an application designed to crawl the Radio Nova history every 30 minutes and upload the found tracks to a specified Spotify playlist. It's based on Puppeteer. My spotify playlist is currently private because of Spotify policies.

Prerequisites

Before installing Nova Boop, ensure you have the following prerequisites met:

  • Node.js installed on your system
  • pnpm package manager installed
  • Access to a Redis instance
  • A Spotify playlist where tracks will be uploaded
  • A Spotify access token for the playlist (See the Spotify access token section below for details)

Installation

To install the required node modules for Nova Boop, run the following command:

pnpm install

Environment Setup

Create a .env file at the root directory of your project and include the following environment variables:

APP_STAGE=dev

SPOTIFY_ID=your_spotify_id
SPOTIFY_PLAYLIST=your_spotify_playlist
SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token
SPOTIFY_SECRET=your_spotify_secret

REDIS_HOST=localhost
REDIS_PORT=6379

Get a Spotify Access Token

To obtain a Spotify access token:

  1. Register your application at Spotify for Developers.

  2. Generate your Client ID and Client Secret from the dashboard settings.

  3. Clone the Spotify web-api-examples repository:

    git clone [email protected]:spotify/web-api-examples.git
  4. Follow the documentation in the Spotify Authorization Code example.

  5. Run the example app and navigate to http://localhost:8888 to connect and obtain a token.

Running the Application

To run Nova Boop in watch mode (with the debugger listening on port 9999), execute:

pnpm start:dev

If necessary, attach a debugger by using the Debug configuration in .vscode/launch.json.

Known Issues

  • Radio Nova's "load more" functionality can sometimes skip tracks. To adjust, modify the wait(milliseconds) values inside the NovaJob.
  • Spotify enforces a rate limit policy. The application has successfully scraped up to 3000 tracks without exceeding the quotas, which is about 6000 requests. If you attempt to scrape more tracks, you may reach limitations. For more information, see Rate Limits.
  • Spotify servers can sometimes be unreliable. To mitigate this, an in-memory playlist is used for its relatively small size and simplicity. Additionally, a basic retry mechanism on startup attempts to fetch the playlist. However, the application may fail on startup due to Spotify's server relative robustness.

nova-boop's People

Contributors

fethca avatar

Watchers

 avatar

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.