alashow / datmusic-api

https://datmusic.xyz
GNU General Public License v2.0
181 stars 53 forks source link

I can't download mp3s #80

Closed Zakirzhan closed 3 years ago

Zakirzhan commented 4 years ago

I can't download/stream mp3s via generated urls

Снимок экрана 2020-08-24 в 20 22 57

file datmusic.log

Снимок экрана 2020-08-24 в 20 24 50

How can I fix this problem?

alashow commented 4 years ago

Check why curl can't download by debugging what happens here.

LevanQerdikashvili commented 4 years ago

hello, i have simillar problem.

how can solve it ? :( image

search working. img url working stream and download not working.

alashow commented 4 years ago

Check my previous comment. The stacktrace doesn't give any information about why it's failing.

LevanQerdikashvili commented 4 years ago

I cann't fix this problem. please help me

when file saved example image it's 0 byte. and

image

why not returned mp3 url? is this problem ?

alashow commented 4 years ago

How does a mp3 url look like? Or rather just send a var dump of $item>

On Fri, Sep 4, 2020, 02:02 LevanQerdikashvili notifications@github.com wrote:

I cann't fix this problem. please help me

when file saved example [image: image] https://user-images.githubusercontent.com/70694064/92208138-a394c900-ee9b-11ea-8f4a-5ad9ee29d69b.png it's 0 byte. and

[image: image] https://user-images.githubusercontent.com/70694064/92209383-f2436280-ee9d-11ea-8f20-f7d070669d8f.png

why not returned mp3 url? is this problem ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-686956893, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDJZEC37OZWHBS4U7W3SECGINANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

https://imus.ge/search?q=eminem&page=1

I added item in search

image

alashow commented 4 years ago

Okay, so urls seems to be empty. No good. Vk might be using new protection or something. What user agent are you using and how old are your tokens?

On Fri, Sep 4, 2020, 02:14 LevanQerdikashvili notifications@github.com wrote:

https://imus.ge/search?q=eminem&page=1

I added item in search

[image: image] https://user-images.githubusercontent.com/70694064/92210476-d17c0c80-ee9f-11ea-8b4e-de10cdc8056d.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-686962778, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDKE4DY6LPUCI3LSY6LSECHXBANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

for tokkens I used this https://vkhost.github.io/ (VK ADMIN) image

user agent default (I have not changed anything)

image

alashow commented 4 years ago

Try using a token by clicking Kate mobile in there, as that's the default user agent set in here: https://github.com/alashow/datmusic-api/blob/941ad5dc8a92d138dbe2ebd7d49627b903c99ca4/app/Util/HttpClient.php#L47

Also, did you have a lot of files in mp3 cache? As you might need to move them to new folder based path.

On Fri, Sep 4, 2020, 02:24 LevanQerdikashvili notifications@github.com wrote:

for tokkens I used this https://vkhost.github.io/ (VK ADMIN) [image: image] https://user-images.githubusercontent.com/70694064/92211211-23716200-eea1-11ea-9954-31f676bc7ea5.png

user agent default (I have not changed anything)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-686966853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDJ3QE4JROHY3I7XKTLSECI2RANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

when I used kate mobile key result is : {"status":"error","error":{"message":"Token confirmation required","code":25}}

LevanQerdikashvili commented 4 years ago

mp3 cache time now 1 secconds for testing.

alashow commented 4 years ago

I mention that error in readme file

On Fri, Sep 4, 2020, 02:37 LevanQerdikashvili notifications@github.com wrote:

when I used kate mobile key result is : {"status":"error","error":{"message":"Token confirmation required","code":25}}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-686972072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDOD422R2PTY5TR36S3SECKJ3ANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

ok. I believe everything will be fine :))))

alashow commented 4 years ago

https://qna.habr.com/q/631865 here someone says it says that when you put wrong user agent. Maybe they used different kate mobile version or something

On Fri, Sep 4, 2020, 02:37 LevanQerdikashvili notifications@github.com wrote:

when I used kate mobile key result is : {"status":"error","error":{"message":"Token confirmation required","code":25}}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-686972072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDOD422R2PTY5TR36S3SECKJ3ANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

oooh yess :) working mp3 url.

but :D

dl and stream no.

https://api.imus.ge//dl/774fc0aa/884768df

alashow commented 4 years ago

Dump the mp3 url where it fails to download with 404 or something. It's probably empty URLs again. Did you match tokens with correct user agents?

LevanQerdikashvili commented 4 years ago

problem was tokken and not user agent. now I used for tokken https://vkserv.ru/api/inst/token

VK.ME (kate not working)

now mp3 urls working but dl and stream not working (I am trying to solve this).

alashow commented 4 years ago

now mp3 urls working but dl and stream not working (I am trying to solve this).

mp3 URLs working and dl/stream not working doesn't make sense. Try this

alashow commented 4 years ago

I updated the code to use newer API and now I use VK Android-s tokens.

LevanQerdikashvili commented 4 years ago

@alashow
1) can I find audio via ID? ( I want to create page example example.com/eminem/beautiful ) 2) can I find similar audio files by genres or audio ID? 3) can I find lyrics?

LevanQerdikashvili commented 4 years ago

@alashow

how can solve it ?

image

alashow commented 4 years ago

Check the readme file about captchas.

On Sun, Sep 13, 2020, 03:21 LevanQerdikashvili notifications@github.com wrote:

@alashow https://github.com/alashow

how can solve it ?

[image: image] https://user-images.githubusercontent.com/70694064/93013660-91154080-f5bb-11ea-9874-5bc34b45f1b6.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alashow/datmusic-api/issues/80#issuecomment-691634046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRZDJHOICL47JSE6PLYHLSFR6HJANCNFSM4QJT5PXA .

LevanQerdikashvili commented 4 years ago

@alashow I try this https://site.com/search?q=eminem&captcha_index=1&captcha_id=949738714471&captcha_key=hqx2 and https://site.com/search?q=eminem&captcha_index=1&captcha_id=949738714471&captcha_key=https://api.vk.com/captcha.php?sid=988974952549&s=1

but not working

alashow commented 4 years ago

Captcha resolution should work correctly if you type the correct captcha key. The first one is correct, you need to submit the guessed captcha key, not the URL to it.