Skip to main content

pyscrapeTrain

Python script for downloading all tracks from a traktrain.com url. It functions as a TrakTrain downloader to mp3.

Similar functionality to defunct scrapeTrainV2 but written in Python. (I wrote this from scratch as I don't have any experience with Ruby).

Setup

You can either clone this repo and run the application using the main.py file.

If you chose to use this method then run:

pip install -r requirements.txt

And make sure to swap out all the commands in this document with python main.py instead of `pyscrapetrain.

OR

Install the pip package, using this command:

pip install pyscrapetrain

How to use:

Terminal interface

Feel free to use the built in terminal interface to download tracks from a single URL / artist name:

pyscrapetrain

image

CLI interface

pyscrapetrain <traktrain url or artist name>

For example:

pyscrapetrain https://traktrain.com/brknglss

OR

pyscrapetrain brknglss

Tracks are downloaded to a pyscrapeTrain/artist folder in your home directory.

Changing folder

To change download folder use the -d flag:

pyscrapetrain <traktrain-url> -d /path/to/folder

Which will create a pyscrapeTrain/artist folder under the path specified. For example:

pyscrapetrain https://traktrain.com/waifu -d /Users/user/Documents

Will create the following folder /Users/user/Documents/pyscrapeTrain/waifu.

Adding custom album

You might want to listen to the playlist of tracks you just downloaded so the script supports a custom album ID3 tag to allow you to sort in your media library.

Use the -a tag to assign a custom album name.

For example:

pyscrapetrain https://traktrain.com/waifu -a "tt waifu"

Which gives: image

Supplying a list of URLs

If you want to scrape multiple traktrain pages then you can point a .txt file with each url you want to scrape on a new line.

For this use-case simply specify the filepath instead of a url.

For example:

pyscrapetrain example_url_list.txt

Example list of urls: image

Metadata

Release files for pyscrapetrain 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyscrapetrain 0.1.3
File Size Uploaded Provenance Actions
pyscrapetrain-0.1.3.tar.gz 9.6 kB Without provenance Details for pyscrapetrain-0.1.3.tar.gz

Release files / pyscrapetrain-0.1.3.tar.gz

Download URL pyscrapetrain-0.1.3.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
95def3bf18047c9df45087f7a0f6233ffc1fe9485b8c2b956687315fa1eb3677
BLAKE2b-256 checksum
How to use checksums
00a4ac44e5ceb4863249b2ec255e7f0898d952506e1c9d48954dcffef80abe8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Security for pyscrapetrain 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page