fy-scrape v1.0.0
Getting Started
Spotify Charts Scrape — also known as fy-scrape
— is a Node.js package to scrape Spotify Charts data. This project was built as a result of the Cloudflare DDoS Protection, which was added to the download services provided by Spotify. This made downloading the chart data using automated workflows impossible.
The project automates the Chromium API to scrape the resources from Spotify. This data includes track names, artists, streams, and track url which hold position on the top 200 spot on the country charts.
The following is not permitted for any reason whatsoever:
- "crawling" the Spotify Service or otherwise using any automated means (including bots, scrapers, and spiders) to view, access or collect information from Spotify or the Spotify Service;
Source: Spotify Terms and Conditions of Use
Installation
To install fy-scrape
use yarn
or npm
as package manager.
yarn add fy-scrape
The project also includes source maps and type definitions which were generated at build by the typescript compiler.
Usage
Create a file scrape.js
at root of the project and import fyScrape
. Pass the destination path as a prop to save the resulting data as a JSON file.
const { fyScrape } = require('fy-scrape');
void fyScrape('./spotify-charts-data.json');
To run the file use node scrape.js
, or add a command in scripts
at package.json
.
{
"scripts": {
"scrape": "node scrape.js"
}
}
License
This project is licensed under the MIT License.
4 years ago
4 years ago