Git Product home page Git Product logo

recordpool-dl's Introduction

Recordpool Downloader

Poetry black Ruff

โš ๏ธ NOTE (06/2023): I am no longer actively maintaining this since DJCity updated their site to work much better. I made this tool for own use and do not offer any support or help for others to run it. I only use it for Bandcamp currently, the pool interactions are likely outdated...

A command-line tool for automatically downloading music tracks from DJ recordpool websites. Implemented with Python 3 using Selenium for interacting with the websites. I use Chromedriver but other browsers could be used as well.

Supported pools:

In addition, there's also an option for Bandcamp to download all tracks / releases after a purchase, though this could be implemented in a nicer way, as now it is just hacked on top of the recordpool base class.

Motivation

Previewing and manually downloading new songs from record pools can be quite slow and frustrating. The song preview streams load slowly and are typically low bitrate. Similarly, launching downloads can be very slow on some record pools. The end result is that it takes a lot of time every week to sift through new songs added to the record pools.

Therefore, I made a tool for myself to automatically download all (desired) tracks from various recordpool services I have / had subscriptions for. After auto-downloading, I can then go through and sort the files much faster directly from my DJ software(s) and in Finder/Explorer, and just delete all the tracks I don't like.

Implementation

  • RecordPoolDownloader contains main and runs the download with a common interface for all recordpools.
  • RecordPool is an abstract (aka virtual) base class that provides the common interface, which is inherited by all recordpool-specific classes.
  • Bandcamp, Beatjunkies, BPMSupreme, DJCity are subclasses of RecordPool that implement the common functions, like get_tracks and download_track for the specific website (if and when a custom implementation is required for each function).

It is arguably a bit over-engineered, but since this project doubled as a learning opportunity for Selenium and web automation for me, I would say over-engineering is to be expected :bowtie:

Todo

  • Proper CLI argument handling using argparse, Click or Typer.
  • Improve Bandcamp downloads

recordpool-dl's People

Contributors

esgrove avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar kzndotsh avatar EsanLe avatar

Watchers

James Cloos avatar  avatar Kostas Georgiou avatar  avatar

recordpool-dl's Issues

error at download

Finally made some progress, but now I'm stuck at this point. Any suggestions?

Starting ChromeDriver...

pool: Beatjunkies
path: /Users/justin/Dropbox/DJ MUSIC SORT/BEATJUNKIES
disk: 214.7 GB (46.1%) free

Choose mode:
0: Single page

0: Multiple pages
1

--- Page: 1 / 1 ---
Getting download links...
ERROR: <class 'AttributeError'>
'WebDriver' object has no attribute 'find_element_by_css_selector'
File "/Users/justin/Documents/GitHub/recordpool-dl/src/RecordPoolDownloader.py", line 163, in
downloader.run_loop()

File "/Users/justin/Documents/GitHub/recordpool-dl/src/RecordPoolDownloader.py", line 50, in run_loop
self.multi_page_loop(number)

File "/Users/justin/Documents/GitHub/recordpool-dl/src/RecordPoolDownloader.py", line 82, in multi_page_loop
self.single_page_download()

File "/Users/justin/Documents/GitHub/recordpool-dl/src/RecordPoolDownloader.py", line 98, in single_page_download
tracks = self.pool.download_page(num_to_download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/justin/Documents/GitHub/recordpool-dl/src/RecordPool.py", line 84, in download_page
tracks = self.get_tracks(num_to_download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/justin/Documents/GitHub/recordpool-dl/src/Beatjunkies.py", line 14, in get_tracks
playlist = self.driver.find_element_by_css_selector(".widget.widget-beats.playlist")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Beatjunkies
Total files downloaded: 0 / 8.2 MB

Beatjunkies.log

BPM Supreme dont work.

BPMSupreme not work, im think the page WWW changed in python file is https://app.bpmsupreme.com/new-releases/classic/audio and redirect to https://app.bpmsupreme.com/d (old page too dont work). Now old page is https://classic.bpmsupreme.com/new-releases/smart/audio or https://classic.bpmsupreme.com/new-releases/audio/genre/dance Can you try fix this? ;-) Thanks bro

Here is error:

`
RECORDPOOL DL
Starting ChromeDriver...

DevTools listening on ws://127.0.0.1:64472/devtools/browser/78ff3161-884c-4fac-a164-7d19eca527c1

pool: BPMSupreme
path: D:\Dropbox\DJ MUSIC SORT\BPMSUPREME
disk: 206.5 GB (44.3%) free
Choose genres manually and press a key to continue...

Choose mode:
0: Single page

0: Multiple pages
0

ERROR: <class 'selenium.common.exceptions.TimeoutException'>
Message:
Stacktrace:
Backtrace:
GetHandleVerifier [0x011C1C53+49427]
(No symbol) [0x01155F41]
(No symbol) [0x0105C64D]
(No symbol) [0x01089818]
(No symbol) [0x010898DB]
(No symbol) [0x010B87D2]
(No symbol) [0x010A4A64]
(No symbol) [0x010B6F2A]
(No symbol) [0x010A4816]
(No symbol) [0x01081127]
(No symbol) [0x010822AD]
GetHandleVerifier [0x01417149+2496009]
GetHandleVerifier [0x0145D572+2783794]
GetHandleVerifier [0x01457491+2758993]
GetHandleVerifier [0x012411D0+571024]
(No symbol) [0x0115F96A]
(No symbol) [0x0115BD88]
(No symbol) [0x0115BE6B]
(No symbol) [0x0114EA97]
BaseThreadInitThunk [0x76EBFA29+25]
RtlGetAppContainerNamedObjectPath [0x77DB7A9E+286]
RtlGetAppContainerNamedObjectPath [0x77DB7A6E+238]

File "C:\Users\pd\Downloads\recordpool-dl-main\src\RecordPoolDownloader.py", line 163, in
downloader.run_loop()

File "C:\Users\pd\Downloads\recordpool-dl-main\src\RecordPoolDownloader.py", line 52, in run_loop
self.single_page_loop()

File "C:\Users\pd\Downloads\recordpool-dl-main\src\RecordPoolDownloader.py", line 58, in single_page_loop
self.pool.update_current_page()

File "C:\Users\pd\Downloads\recordpool-dl-main\src\RecordPool.py", line 175, in update_current_page
self.current_page_number = self.get_page_number()
^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\pd\Downloads\recordpool-dl-main\src\BPMSupreme.py", line 47, in get_page_number
WebDriverWait(self.driver, self.wait_time).until(

File "C:\Users\pd\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\support\wait.py", line 95, in until
raise TimeoutException(message, screen, stacktrace)


BPMSupreme
Total files downloaded: 0 / 0.0 MB

Press any key to continue . . .`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.