Dniel97 / orpheusdl-beatport

An OrpheusDL Beatport module
36 stars 12 forks source link

all links download the same song, Rick Astley song 'Never Gonna Give You Up'. :( #21

Open Tr1pl3Six opened 4 days ago

Tr1pl3Six commented 4 days ago

i was getting 403, but after the recommended fixes, All links I pass in download a portion of the Rick Astley song 'Never Gonna Give You Up'.

Looks like the beatport devs are having some fun.

tyrex355 commented 4 days ago

फाक यू बीटपोर्ट

tedinati commented 4 days ago

Use your brain and check for opened issues instead of creating duplicated issue, retarded moron

OrfiDev commented 4 days ago

@tedinati woah chill, why are you so rude?

Tr1pl3Six commented 3 days ago

@tedinati I don't see a duplicate issue regarding that any request I make downloads the portion of Rick Astley song. Like I said in my comment I applied all the '403' fixes from the 403 issue ticket and after doing that I now have this issue. Im not screwing around this is actually happening. in the screen shot you can see it showing a 1mb file for a 5min song. any link I request always downloads this exact file that is 1mb in size. Maybe it only me then. dl

tyrex355 commented 3 days ago

Any fix I can't download anything

beats2588 commented 3 days ago

same here...

tyrex355 commented 2 days ago

how shameful that some people using this script to earn money on telegram but can't provide the fix publically...

johnneerdael commented 2 days ago

They pulled a good trick on us, completely rewritten their authentication and streaming algorithm with encryption, instead of a fork I decided to setup a complete new functional module ;) And this time you don't get rick rolled by beatport but we are rickrolling them:

https://github.com/johnneerdael/orpheusdl-beatport-v2

Romchess1985 commented 2 days ago

They pulled a good trick on us, completely rewritten their authentication and streaming algorithm with encryption, instead of a fork I decided to setup a complete new functional module ;) And this time you don't get rick rolled by beatport but we are rickrolling them:

Hello, thank you so much for your work! What you have done for us electronic music lovers is a masterpiece, but unfortunately there are many who use your software to pump out tonnes of material and then sell it through all sorts of telegram bots.There will always be such barbarians.Give them something good and they will turn it into a disaster.

I would also like to ask you about the quality of Flac! I don't see any mention of the option to download lossless quality in v2! Could you please add that option?

tyrex355 commented 2 days ago

They pulled a good trick on us, completely rewritten their authentication and streaming algorithm with encryption, instead of a fork I decided to setup a complete new functional module ;) And this time you don't get rick rolled by beatport but we are rickrolling them:

https://github.com/johnneerdael/orpheusdl-beatport-v2

I'm receiving this error

ERROR:root:Error validating account: beatport --> Beatport: Account does not have an active "Link" subscription Traceback (most recent call last): File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 148, in valid_account raise self.exception('Beatport: Account does not have an active "Link" subscription') orpheus.core.Orpheus.load_module..ModuleError: beatport --> Beatport: Account does not have an active "Link" subscription During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ubuntu/OrpheusDL/orpheus.py", line 225, in main() File "/home/ubuntu/OrpheusDL/orpheus.py", line 180, in main module = orpheus.load_module(service_name) File "/home/ubuntu/OrpheusDL/orpheus/core.py", line 210, in load_module loadedmodule = class(module_controller) File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 86, in init self.login(module_controller.module_settings['username'], File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 133, in login self.valid_account() File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 163, in valid_account raise self.exception('Failed to validate Beatport account') orpheus.core.Orpheus.load_module..ModuleError: beatport --> Failed to validate Beatport account

tyrex355 commented 2 days ago

They pulled a good trick on us, completely rewritten their authentication and streaming algorithm with encryption, instead of a fork I decided to setup a complete new functional module ;) And this time you don't get rick rolled by beatport but we are rickrolling them: https://github.com/johnneerdael/orpheusdl-beatport-v2

I'm receiving this error

ERROR:root:Error validating account: beatport --> Beatport: Account does not have an active "Link" subscription Traceback (most recent call last): File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 148, in valid_account raise self.exception('Beatport: Account does not have an active "Link" subscription') orpheus.core.Orpheus.load_module..ModuleError: beatport --> Beatport: Account does not have an active "Link" subscription During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ubuntu/OrpheusDL/orpheus.py", line 225, in main() File "/home/ubuntu/OrpheusDL/orpheus.py", line 180, in main module = orpheus.load_module(service_name) File "/home/ubuntu/OrpheusDL/orpheus/core.py", line 210, in load_module loadedmodule = class(module_controller) File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 86, in init self.login(module_controller.module_settings['username'], File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 133, in login self.valid_account() File "/home/ubuntu/OrpheusDL/modules/beatport/interface.py", line 163, in valid_account raise self.exception('Failed to validate Beatport account') orpheus.core.Orpheus.load_module..ModuleError: beatport --> Failed to validate Beatport account

I have link subscription but still saying error with the new script I filled in all details correctly

johnneerdael commented 2 days ago

Let me check if it still works today for me or if I happened to have some settings hardcoded I shouldn't

johnneerdael commented 2 days ago

➜ OrpheusDL git:(master) ✗ python3 download.py argy-november.txt


/ __ \ __ \ _ _ __ __ '__ '_ \ ' \ / \ / __ __ _) __/ _ __ \ __ \/ _ .__/ _ _ ___ _, _/___/ __
_

=== Downloading track RITMO (Original Mix) (19611339) === Album: RITMO (4769103) Artists: Argy, Omiki, Son of Son (8642) Release year: 2024 Duration: 04m:31s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19611339 downloaded ===


/ __ \ __ \ _ _ __ __ '__ '_ \ ' \ / \ / __ __ _) __/ _ __ \ __ \/ _ .__/ _ _ ___ _, _/___/ __
_

=== Downloading track Melodica (Original Mix) (19566127) === Album: Melodica (4752139) Artists: Kevin Saunderson, E-Dancer, Dantiez (18020) Release year: 2024 Duration: 04m:34s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19566127 downloaded === My version still works here let me make a debug build that prints out the entire authenticatio chain to see where the error is vs with me

Abhi5033 commented 2 days ago

➜ OrpheusDL git:(master) ✗ python3 download.py argy-november.txt

/ \ | | | | | | | | |_ | | | | | | | | | | | '| ' | ' \ / \ | | / | | | | | | || | | | |_) | | | | / |_| \ |**| | |__ **/|| | .**/|| |||_,|_/_/|**__| | | |_|

=== Downloading track RITMO (Original Mix) (19611339) === Album: RITMO (4769103) Artists: Argy, Omiki, Son of Son (8642) Release year: 2024 Duration: 04m:31s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19611339 downloaded ===

/ \ | | | | | | | | |_ | | | | | | | | | | | '| ' | ' \ / \ | | / | | | | | | || | | | |_) | | | | / |_| \ |**| | |__ **/|| | .**/|| |||_,|_/_/|**__| | | |_|

=== Downloading track Melodica (Original Mix) (19566127) === Album: Melodica (4752139) Artists: Kevin Saunderson, E-Dancer, Dantiez (18020) Release year: 2024 Duration: 04m:34s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19566127 downloaded === My version still works here let me make a debug build that prints out the entire authenticatio chain to see where the error is vs with me

Lossless works ?

tyrex355 commented 2 days ago

➜ OrpheusDL git:(master) ✗ python3 download.py argy-november.txt / \ | | | | | | | | |_ | | | | | | | | | | | '| ' | ' \ / \ | | / | | | | | | || | | | |_) | | | | / |_| \ |**| | |__ **/|| | .**/|| |||_,|_/_/|**__| | | |_| === Downloading track RITMO (Original Mix) (19611339) === Album: RITMO (4769103) Artists: Argy, Omiki, Son of Son (8642) Release year: 2024 Duration: 04m:31s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19611339 downloaded === / \ | | | | | | | | |_ | | | | | | | | | | | '| ' | ' \ / \ | | / | | | | | | || | | | |_) | | | | / |_| \ |**| | |__ **/|| | .**/|| |||_,|_/_/|**__| | | |_| === Downloading track Melodica (Original Mix) (19566127) === Album: Melodica (4752139) Artists: Kevin Saunderson, E-Dancer, Dantiez (18020) Release year: 2024 Duration: 04m:34s Service: Beatport Codec: AAC-LC, bitrate: 128kbps, sample rate: 44.1kHz

    Downloading track file
    Downloading artwork
    Tagging file

=== Track 19566127 downloaded === My version still works here let me make a debug build that prints out the entire authenticatio chain to see where the error is vs with me

Lossless works ?

Let him fix the authentication issue first then ask for losless atleast if he fix it it will work for m4a

johnneerdael commented 2 days ago

Thanks for the amazing feedback, I created a debug version to see why it works for me: https://github.com/johnneerdael/orpheusdl-beatport-v2

Can you use the debug-version branch, it will write a debug log including all headers and responses allowing me to troubleshoot why it works for me

Be mindful that is also has your username and password, make sure password is at least gone everywhere and feel free to remove any other personal data such as your email cause everything will be logged, share file privately with me if desired ;) (recommended due to sensitive data)

Search for your username and password and empty then when you come across them. Then provide me the debug file

REQUEST BODY: 2024-11-23 12:58:18,973 - { "username": "", "password": "" }

It contains every header and response in cleartext so also all your account and subscription details. but I need all secrets besides username and password to see if I hardcoded something that was dynamic...

Oh yeah debug file is in the OrpheusDL/debug folder

johnneerdael commented 2 days ago

They pulled a good trick on us, completely rewritten their authentication and streaming algorithm with encryption, instead of a fork I decided to setup a complete new functional module ;) And this time you don't get rick rolled by beatport but we are rickrolling them:

Hello, thank you so much for your work! What you have done for us electronic music lovers is a masterpiece, but unfortunately there are many who use your software to pump out tonnes of material and then sell it through all sorts of telegram bots.There will always be such barbarians.Give them something good and they will turn it into a disaster.

I would also like to ask you about the quality of Flac! I don't see any mention of the option to download lossless quality in v2! Could you please add that option?

I actually agree, I'm going to change my repo to private, and give the few of you access. Anyway else that wants access can give me a very good reason and personal background :)

johnneerdael commented 2 days ago

Set to private and given 3 people access to provide me the required debug logging, we see what we do from there. Maybe a standalone beatport downloader distributed by a private invite mailing only maillist or whatever. Keeping this project working for us music lovers who dont abuse this but are home djs who want to play around and built a collection. Any ideas are welcome, but I also indeed dont want beatport to give away all the details I uncovered as well as their encryption methods which is why you need the new python modules :D

Pull-3D commented 2 days ago

Set to private and given 3 people access to provide me the required debug logging, we see what we do from there. Maybe a standalone beatport downloader distributed by a private invite mailing only maillist or whatever. Keeping this project working for us music lovers who dont abuse this but are home djs who want to play around and built a collection. Any ideas are welcome, but I also indeed dont want beatport to give away all the details I uncovered as well as their encryption methods which is why you need the new python modules :D

If you want to give access, I use it responsibly.

johnneerdael commented 1 day ago

I'm working on a proper fix first which we are either there or almost there. After that I'm going to think of a private community model that includes some sort of vetting or invite friend only model so this code does not get on hands of abusers or Beatport

johnneerdael commented 1 day ago

And then I'm still thinking of making it a standalone piece of software that also provides capabilities such as getting any playlist at once, such as private ones or hype and top 100

Pull-3D commented 1 day ago

And then I'm still thinking of making it a standalone piece of software that also provides capabilities such as getting any playlist at once, such as private ones or hype and top 100

check my script https://github.com/Pull-3D/beat/blob/main/top.sh

huiskesmartijn commented 1 day ago

Let me know if you need some help with debugging. I have some experience with making scripts for similar applications, so I might be able to help here and there.

I'm working on a proper fix first which we are either there or almost there. After that I'm going to think of a private community model that includes some sort of vetting or invite friend only model so this code does not get on hands of abusers or Beatport

johnneerdael commented 1 day ago

Sounds like someone definitely does not want access lol, I want to ensure it stays in safe hands

@huiskesmartijn it's already fixed, now I just need to fix the quality settings ;)

huiskesmartijn commented 1 day ago

Sounds like someone definitely does not want access lol, I want to ensure it stays in safe hands

@huiskesmartijn it's already fixed, now I just need to fix the quality settings ;)

Ah I was only using it for myself. I was using the telegram bot for a while before seeing this repo. Apart from having engineering/programming as a hobby, I like to occasionally be a bedroom DJ haha.

If you ever decide to accept more people, keep me in mind:)

johnneerdael commented 1 day ago

I'm sure you can figure that one out from my github

Tr1pl3Six commented 1 day ago

@johnneerdael thanks for doing this, I sent you and email.

OrfiDev commented 1 day ago

In my opinion, the Beatport module should be rewritten to perfectly match what one of the DJ apps (I think they're called DJ platforms? Not sure) that properly support lossless do, which may limit its features or something, but then it could be kept public since then they wouldn't want the DJ app to break (assuming it is matched perfectly so it can't be distinguished from Beatport's side at least), so in theory you'd want the candidate app to be (in no particular order): 1) Not super obfuscated or complicated 2) Have Beatport support directly integrated needing a software update rather than a plugin or something (making the time to patch slower) 3) Have as many features related to Beatport as possible that the current orpheusdl-beatport module uses, to sacrifice as little as possible from the module 4) Support lossless (obviously, otherwise they'd just change it so that even that application would get a rickroll for the lossless streams since the app couldn't play those anyway) 5) Preferably be a big player in the space rather than a small company or something since I'm not sure what Beatport's licensing is but it's better to avoid even the chance that you'd be increasing API costs for said company if they're small just to archive a bunch of entire artist catalogues or something (probably not noticeable even then but still it just feels wrong).

johnneerdael commented 1 day ago

The only way that's possible is if it's as streaming library, without allowing you use-case how do you see this happen? We already have these integrations on our apps. And Beatport has its open mobile app for streaming

OrfiDev commented 1 day ago

The only way that's possible is if it's as streaming library, without allowing you use-case how do you see this happen? We already have these integrations on our apps.

Um, could you please rephrase?

And Beatport has its open mobile app for streaming

The mobile app isn't supposed to support lossless I believe?

johnneerdael commented 1 day ago

The mobile app isn't supposed to support lossless I believe?

I'm not sure I don't have the lossless subscription so I cannot test this

johnneerdael commented 1 day ago

@johnneerdael thanks for doing this, I sent you and email.

I don't think I have got anything

huiskesmartijn commented 1 day ago

The only way that's possible is if it's as streaming library, without allowing you use-case how do you see this happen? We already have these integrations on our apps.

Um, could you please rephrase?

And Beatport has its open mobile app for streaming

The mobile app isn't supposed to support lossless I believe?

"Lossless streaming is only available via supported DJ software, and is not available when streaming via Beatport.com, Beatport DJ, or the Beatport app." - beatport site

Abhi5033 commented 1 day ago

@johnneerdael thanks for doing this, I sent you and email.

I don't think I have got anything

Hii I have sent you an email for access. please check

Dniel97 commented 1 day ago

@johnneerdael I'm not allowing a private repo where YOU decide who will get access to it. I think it's kinda shady to create a private fork of the reverse engineering work all contributors and I did and I won't tolerate this. I'm going to update the module again to properly fix the issue soon...

johnneerdael commented 1 day ago

The people who have access to it can confirm this is not a fork of your repo I have superate modules for auth and stream and not a simple single framework, this is a complete rewrite, and I'm not releasing is. I'm working on a ui based app with more functionality such as search and displaying artwork that has nothing to do with Orpheus but already supports track downloads and search up to flax

johnneerdael commented 1 day ago

image image

Still need to figure out renaming files but I'm not opening it up wether you want to or not, I reverse engineered the new algorithms with packet capture initially and that's what my new Beatport plugin was based on, I think I still will fix it for quality and then leave it as is and focus on the ui interface which will be able to download entire charts releases of tracks, but by ui and api

capodeicapii commented 1 day ago

I'm pretty sure we are using the same bot and i also found this repo. If anyone needs testers i would be happy to help and it's in safe hands as I'm using it for myself to download the tracks I need in HQ.

johnneerdael commented 1 day ago

I did a diff sake for yourself, and here you can see every line of code thats still the same, not a whole lot but if you are going to be a fuss about it I'll change those class names to not look like yours...: @Dniel97 , just to reiterate, this is private because its not a fork, nor a rewrite, but a complete new integration

from datetime import timedelta, datetime

from utils.utils import create_requests_session @@ -9,254 +6,60 @@ from utils.utils import create_requests_session class BeatportApi: def init(self): self.API_URL = 'https://api.beatport.com/v4/' self.access_token = None self.s = create_requests_session()

 def headers(self, use_access_token: bool = False):

 def auth(self, username: str, password: str) -> dict:
         'username': username,

     if r.status_code != 200:
         return r.json()

 def refresh(self):

     if r.status_code != 200:
         return r.json()

 def set_session(self, session: dict):
     self.access_token = session.get('access_token')

@@ -271,19 +74,13 @@ class BeatportApi: }

 def _get(self, endpoint: str, params: dict = None):

     if not params:
         params = {}

     if r.status_code == 401:
         raise ValueError(r.text)

@@ -343,118 +140,10 @@ class BeatportApi: def get_search(self, query: str): return self._get('catalog/search', params={'q': query})

 def get_track_download(self, track_id: str, quality: str):

     return self._get(f'catalog/tracks/{track_id}/download', params={'quality': quality})

My module: (47kb) 2024-11-24 14_43_10-orpheusdl-beatport-v2

Your module: (24kb) 2024-11-24 14_43_30-orpheusdl-beatport

@Dniel97 Your being ignorant if you think this is stealing your work, my codebase is almost twice as big.

Btw as I clearly stated my goal is not to keep my work private, but community driven, so it's used by the right people and not abusers like the telegram bots and to ensure beatport does not force this on us again cause I'm pretty sure it's open source work like this thats being abused at scale is what caused them to implement their new features. If someone else made this I would have also wanted to be part of that community and contribute as some people have massively done. But I'm a home dj who just likes to collect a nice library for practice at home. And don't use this in any way professionally.

johnneerdael commented 21 hours ago

Anyway my version is now fully functional, also with flac as well as for private playlists and charts. I rewrote the complete algorithm instead of relying on the android mobile api, which simplified things a lot. My plugin has nothing to do with this one and is based on different endpoints in a lot of cases.

MadeInMachines commented 18 hours ago

Anyway my version is now fully functional, also with flac as well as for private playlists and charts. I rewrote the complete algorithm instead of relying on the android mobile api, which simplified things a lot. My plugin has nothing to do with this one and is based on different endpoints in a lot of cases.

Can I try it?

johnneerdael commented 16 hours ago

Anyway my version is now fully functional, also with flac as well as for private playlists and charts. I rewrote the complete algorithm instead of relying on the android mobile api, which simplified things a lot. My plugin has nothing to do with this one and is based on different endpoints in a lot of cases.

Can I try it?

If you can figure out my email address @huiskesmartijn did from my comments above and give me a open description of who you are and where you are from I'll give you access perhaps. Until I've figured out a way to make it accessible but not abused I'm not allowing access to people not opening up or contributing like @huiskesmartijn and @tyrex355 did. I'll happily grant access to whoever can tell me enough about themselves in order for me to ensure it's safe in their hands. I don't need people making telegrams bot of it for the masses I did this for my self and to help other home dj's and want a local connection to practice. Since my plugin is 100% functional including up to lossless and support for charts and private playlists I'm not sure how much attention my ui project will be getting from now, but who knows one day, it will then be protected and you will have to login through LinkedIn oauth before getting access (to deny certain profiles ;). That is if I ever release a public build, any one else here who cares about the community and has good ideas on how to build it while keeping our Beatport devs and abusers I'm welcome to any input, this has gone closed source based on a remark in here how abusers misuse this and how this plugin probably was one of the main contributors to Beatport implementing the actions they did.

Romchess1985 commented 11 hours ago

Anyway my version is now fully functional, also with flac as well as for private playlists and charts. I rewrote the complete algorithm instead of relying on the android mobile api, which simplified things a lot. My plugin has nothing to do with this one and is based on different endpoints in a lot of cases.

Can I try it?

If you can figure out my email address @huiskesmartijn did from my comments above and give me a open description of who you are and where you are from I'll give you access perhaps. Until I've figured out a way to make it accessible but not abused I'm not allowing access to people not opening up or contributing like @huiskesmartijn and @tyrex355 did. I'll happily grant access to whoever can tell me enough about themselves in order for me to ensure it's safe in their hands. I don't need people making telegrams bot of it for the masses I did this for my self and to help other home dj's and want a local connection to practice. Since my plugin is 100% functional including up to lossless and support for charts and private playlists I'm not sure how much attention my ui project will be getting from now, but who knows one day, it will then be protected and you will have to login through LinkedIn oauth before getting access (to deny certain profiles ;). That is if I ever release a public build, any one else here who cares about the community and has good ideas on how to build it while keeping our Beatport devs and abusers I'm welcome to any input, this has gone closed source based on a remark in here how abusers misuse this and how this plugin probably was one of the main contributors to Beatport implementing the actions they did.

Hi johnneerdael!

Your goals sound noble, so that this isn't shared and so that crazy people don't make their own telegram bots to sell to you!

I can say with great certainty that this will only end when beatport themselves remove the ability to stream from their site!

I'm not going to prove to anyone here that I used this leaked flac download solely for my great love of electronic music!

You just know this about yourself: that someone who respects the authors and their work will never look for a leak to get music from these authors for free!!!

mnml38 commented 7 hours ago

Anyway my version is now fully functional, also with flac as well as for private playlists and charts. I rewrote the complete algorithm instead of relying on the android mobile api, which simplified things a lot. My plugin has nothing to do with this one and is based on different endpoints in a lot of cases.

Can I try it?

If you can figure out my email address @huiskesmartijn did from my comments above and give me a open description of who you are and where you are from I'll give you access perhaps. Until I've figured out a way to make it accessible but not abused I'm not allowing access to people not opening up or contributing like @huiskesmartijn and @tyrex355 did. I'll happily grant access to whoever can tell me enough about themselves in order for me to ensure it's safe in their hands. I don't need people making telegrams bot of it for the masses I did this for my self and to help other home dj's and want a local connection to practice. Since my plugin is 100% functional including up to lossless and support for charts and private playlists I'm not sure how much attention my ui project will be getting from now, but who knows one day, it will then be protected and you will have to login through LinkedIn oauth before getting access (to deny certain profiles ;). That is if I ever release a public build, any one else here who cares about the community and has good ideas on how to build it while keeping our Beatport devs and abusers I'm welcome to any input, this has gone closed source based on a remark in here how abusers misuse this and how this plugin probably was one of the main contributors to Beatport implementing the actions they did. johnneerdael hello! There was no time on the weekend. today I clicked on an invitation to an empty repository, it would be great if you wrote to me the email address is listed in my profile

mnml38 commented 7 hours ago

@johnneerdael I have no idea how I'm supposed to figure out what your email address is. I've looked everywhere, and the only result is that I feel like I'm very stupid?

papyrus-nerd-boxer@duck.com

qyraai commented 46 minutes ago

Hello @johnneerdael , that looks great. I'm a DJ who supports artists buying new staff, but I only spend some time purchasing on Beatport. The OrpheusDL Beatport module gives me nice flexibility and saves some euros. how like can I have access to this new module, as I understand?