kaimi-io / yandex-music-download

Yandex Music Downloader
https://kaimi.io/2013/11/yandex-music-downloader/
MIT License
239 stars 30 forks source link

Загружается только 30 секунд #23

Closed hhejkhalkfahjahsf closed 4 years ago

hhejkhalkfahjahsf commented 4 years ago

ya.pl --cookie "Session_id=3:1599336781.5.0.1599336781602:DDFHsg:48.11166458334.0.2.0:3222489.833617.tBYeau9PyzqoTwvnHo9vHXAozT4" -u https://music.yandex.ru/album/3622135/track/30022994 --debug
[DEBUG] main::print_perl_info(1221): OS: linux; Path: /usr/bin/perl; Version: v5.30.0
[INFO] Checking Yandex.Music availability
[OK] Yandex.Music is available
[INFO] Fetching album info: 3622135
[INFO] Album title: Subway Gawdz
[INFO] Tracks total: 14
[INFO] Filtering single track: 30022994 [3622135]
[INFO] Trying to fetch track: Too Many Zooz - FTG, Pt. 1
[DEBUG] main::get_track_url(644): Track url: https://s363sas.storage.yandex.net/get-mp3/61bb01ed1dcc37b953772725aaa3aafe/0005ae97e3f43fff/rmusic/U2FsdGVkX1-jTtx0AsRHdjm6mqftETxmsmRpfFOGH68eFsks2ZPdYiXgGRP1z1MD-bT8il-xlsu-ZqCXJrWvD70uj1SX9oPFfT_Rzdiy1TQ/aa9df326f2d5b358ec5ff2c69c8f601beeb0817610773c0a77f4cb14e141511f?track-id=30022994&from=service-10-track&similarities-experiment=default
[DEBUG] main::download_track(519): File size from header: 481115
[OK] Temporary saved track at ./aHvv6yzkrR
[DEBUG] main::fetch_album_cover(985): Cover url: https://avatars.yandex.net/get-music-content/38044/befca0be.a.3622135-1/400x400
[DEBUG] main::write_mp3_tags(954): add_frame: TYER=2016
[DEBUG] main::write_mp3_tags(954): add_frame: TRCK=6
[DEBUG] main::write_mp3_tags(954): add_frame: TPE2=Too Many Zooz
[DEBUG] main::write_mp3_tags(954): add_frame: TALB=Subway Gawdz
[DEBUG] main::write_mp3_tags(954): add_frame: TPE1=Too Many Zooz
[DEBUG] main::write_mp3_tags(954): add_frame: TIT2=FTG, Pt. 1
[DEBUG] main::write_mp3_tags(954): add_frame: TCON=pop
[DEBUG] main::write_mp3_tags(954): add_frame: APIC=ARRAY(0x5614d6ff
[INFO] MP3 tags added for ./aHvv6yzkrR
[INFO] ./aHvv6yzkrR -> ./Too Many Zooz - FTG, Pt. 1.mp3
[OK] Done!

mp3info -x *.mp3
Too Many Zooz - FTG, Pt. 1.mp3 does not have an ID3 1.x tag.
File: Too Many Zooz - FTG, Pt. 1.mp3
Media Type:  MPEG 1.0 Layer III
Audio:       128 kbps, 44 kHz (joint stereo)
Emphasis:    none
CRC:         No
Copyright:   No
Original:    Yes
Padding:     Yes
Length:      0:30```
kaimi- commented 4 years ago

С IP-адреса какой страны скачивание происходит? Есть активная подписка на аккаунте? Версия та, которая 4 дня назад была загружена?

hhejkhalkfahjahsf commented 4 years ago

Нет, подписки нету, пробовал зарегестрировать еще один аккаунт на результат не повлияло. Через браузер с того же ip треки воспроизводятся полностью, через консоль браузера могу получить ссылку на полный mp3 файл. Перед запуском сделал git clone,

ip с которого пытаюсь скачивать inetnum: 178.66.0.0 - 178.66.255.255 netname: RU-AVANGARD-DSL descr: Saint-Peterburg branch of the OJSC "Rostelecom" На пикче кукис котрый пытаюсь использовать для авторизации. Untitled

root@ubuperl:~/yamuc/yandex-music-download/src# ./ya.pl --cookie "Session_id=3:1599686467.5.0.1599339342730:DDFHsg:4.11166458334.0.2.0:3222683.485645.0djZ140zRx9rjbKdTm-wXDsP4L8" -u https://music.yandex.ru/album/4437235/track/35541902 --debug
Use of uninitialized value in concatenation (.) or string at ./ya.pl line 1127.
[DEBUG] (310): Yandex Music Downloader v1.1

[DEBUG] main::print_perl_info(1225): OS: linux; Path: /usr/bin/perl; Version: v5.30.0
[INFO] Checking Yandex.Music availability
[OK] Yandex.Music is available
[INFO] Fetching album info: 4437235
[INFO] Album title: Tortuga, Vol. 1
[INFO] Tracks total: 43
[INFO] Filtering single track: 35541902 [4437235]
[INFO] Trying to fetch track: Tortuga - Until the Light Breaks
[DEBUG] main::get_track_url(648): Track url: https://s24vla.storage.yandex.net/get-mp3/9362b59978c7b35a5dc4b59b5b174c67/0005aee90c9b85d1/rmusic/U2FsdGVkX18uELTAOsWWtpiQbh7dVt__h5M60IV8zTKCLxF28C837eeSFiXLdI2JrpEGAnn2NW2UUZv3Q1-lFC0NTPtIF8EBxRr3AVl32sc/de0ed02394ea9d3ed0c4ac52fc8a6789fb240b5d371d32b2c36c4eae01504e65?track-id=35541902&from=service-10-track&similarities-experiment=default
[DEBUG] main::download_track(523): File size from header: 481115
[OK] Temporary saved track at ./S5tqdx1bjs
[DEBUG] main::fetch_album_cover(989): Cover url: https://avatars.yandex.net/get-music-content/41288/7a9e7e6d.a.4437235-1/400x400
[DEBUG] main::write_mp3_tags(958): add_frame: TPE2=Tortuga
[DEBUG] main::write_mp3_tags(958): add_frame: TIT2=Until the Light
[DEBUG] main::write_mp3_tags(958): add_frame: TRCK=7
[DEBUG] main::write_mp3_tags(958): add_frame: TCON=lounge
[DEBUG] main::write_mp3_tags(958): add_frame: TYER=2015
[DEBUG] main::write_mp3_tags(958): add_frame: TPE1=Tortuga
[DEBUG] main::write_mp3_tags(958): add_frame: TALB=Tortuga, Vol. 1
[DEBUG] main::write_mp3_tags(958): add_frame: APIC=ARRAY(0x55bb4741
[INFO] MP3 tags added for ./S5tqdx1bjs
[INFO] ./S5tqdx1bjs -> ./Tortuga - Until the Light Breaks.mp3
[OK] Done!
root@ubuperl:~/yamuc/yandex-music-download/src# mp3info -x *.mp3
Tortuga - Until the Light Breaks.mp3 does not have an ID3 1.x tag.
File: Tortuga - Until the Light Breaks.mp3
Media Type:  MPEG 1.0 Layer III
Audio:       128 kbps, 44 kHz (joint stereo)
Emphasis:    none
CRC:         No
Copyright:   No
Original:    Yes
Padding:     Yes
Length:      0:30

root@ubuperl:~/yamuc/yandex-music-download/src# curl ifconfig.io/country_code
RU
QmFzZTY0IGlzIGEgZW5jb25kaW5nI commented 4 years ago

Проблема заключалась в спецсимволах. "Session_id=3:1599686467.5.0.1599339342730:DDFHsg:4.11166458334.0.2.0:3222683.485645.0djZ140zRx9rjbKdTm-wXDsP4L8" Двойных кавычек тут недостаточно, так все работает. 'Session_id=3:1599686467.5.0.1599339342730:DDFHsg:4.11166458334.0.2.0:3222683.485645.0djZ140zRx9rjbKdTm-wXDsP4L8' Извините за беспокойство и создание глупой таски. Но было бы неплохо выводить используемый кукис в дебаг, так проблема бы стала очевидной гораздо раньше.