Skip to content

ExperimentalHypothesis/somafm-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SomaFM Scrapper

A Python-based project for scraping playlist from SomaFM for couple of ambient-based stations.

Description

This project contains a script to scrape playlist from SomaFM and save it to MySQL. The script is designed to be run periodically using a cron job to keep the data updated. It runs every hour and basically builds a long term database of what was played in SomaFM.

It scrapes the name of author, song, album and url.

Usage

  1. Clone the repository:
    git clone https://github.com/ExperimentalHypothesis/somafm-scrapper.git
    cd somafm-scrapper
  2. Set up a virtual environment:
     python -m venv venv
  3. Install dependencies:
     pip install -r requirements.txt
  4. Run manually:
     source venv/bin/activate
     python main.py
  5. Run with cronjob:
     crontab -e
     59 * * * * /path/to/your//venv/bin/python /path/to/your/project/main.py >> /path/to/your/project/logs.txt 2>&1
    

Prerequisites

You need to have a running MySql DB instance and provide credentials in .env file to connect to it.

About

Scraping playlist from SomaFM for couple of ambient-based stations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published