/lofi_scraper

A python scraper for lofi music used on https://github.com/YeyoM/lofi_code

Primary LanguagePython

Lofi Music Web Scraper

This is a web scraper that scrapes lofi music from multiple sources and saves the urls to a firebase database. The scraper is written in Python and uses the BeautifulSoup library to scrape the web pages.

Installation

To install the scraper, you need to have Python installed on your machine. You can download Python from the official website here.

You will also need to have virtualenv installed on your machine. You can install virtualenv using the following command:

pip install virtualenv

After that you can clone the repository and install the required packages using the following commands:

git clone
cd lofi-music-web-scraper

# Create a virtual environment
virtualenv lofi

# Activate the virtual environment
source lofi/bin/activate

# Install the required packages
pip install -r requirements.txt

Available commands

The scraper has the following commands:

  1. Run the scraper and save the songs to a json file:
python src/scraper.py
  1. Running the tests:
python -m unittest discover -s tests -p "test_*.py"
  1. Save the songs to a firebase database:
python src/firebase.py
  1. Run the scraper and save the songs to a firebase database:

Project structure

The project has the following structure:

lofi_scraper/
├── data/
│   └── scrapped_songs.json
├── src/
│   ├── __init__.py
│   ├── scraper.py
│   ├── firebase.py
│   └── test_scraper.py
├── README.md
├── requirements.txt
└── .gitignore