Downloads all sounds for a given search URL.
Saves files in the original format and also converts to M4A.
Prerequisites: Python 3 and PIP.
Install dependencies:
pip install -r requirements.txt
- Add your auth tokens
- Log in to freesound.org
- Open your browser's developer console and go to the network tab.
- Click a download link for a sound and watch the network tab.
- Find a request with a 302 response (the file download) and look at the cookies sent for that request.
- Copy the values of the
sessionidand thecsrftokencookies. - Open the
.envfile in this project and place your own tokens in there:
SESSIONID=your_session_id
CSRFTOKEN=your_csrf_token
- Create a search URL
- Make a search on freesound.org and apply any filters you want.
- Copy the URL (it contains your search options)
- Place the URL in the
.envfile:
SEARCH_URL=your_search_url
python3 main.py
The scraper will create:
downloads/- a directory where it saves the original audio files.downloads/m4a/- a directory with each file converted to M4A (web friendly) and given a UUIDv4 name.downloads/downloaded_samples.json- a tracking file which stores file names to prevent duplicate downloads.