J
J
jekanok2015-01-03 19:57:33
Parsing
jekanok, 2015-01-03 19:57:33

How to parse music from hares no?

How to parse a request in a site search and get a response from the site?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Kitaev, 2015-01-03
@deliro

Umm. There is nothing complicated there.
Sending a request:
You are given an answer. There is a div with the class "musicset-track-list__items". In it, you sort through all the divs-descendants. Each descendant div has a data-url parameter - a link to json which contains a direct link to mp3 (there is a bit of a tail cut):

{"url":"http://cdndl.zaycev.net/1021/790315/30_seconds_to_mars_-_attack.mp3?dlKind=play&format=json"}

A
Alexander Semchenko, 2016-04-28
@0xcffaedfe

Like this: https://github.com/pixfid/go-zaycevnet

P
PTFN, 2017-12-09
@PTFN

Method 1:
Either on the page with music, look for a div with the class musicset-track clearfix hover-bound musicset-track_hover and take the data-url parameter from it, where is the download link, or start the song (or add ?autoplay=1 to the url), js write in console: ZINA.Player.currentUrl where it will link to the download
method with API:
Top songs: api.zaycev.net/external/top?page=1&access_token=QsbkcctJITQL5crQArpGNB09MqlEG7n3-BiqlNlZ8-4vKJPMH45spuoBvp9p62ev_5sXq4UEcaVs2xbtpX4uwUEbM31C81pggW2MCPzmLYSgQTE6LkV-1mx69Vh81B1lLCnbU0h_Nhy0EryAU1bUSdapMIX6dit-el6NqnCArsxwPBN7hh6Hmx5gLUBmJV1F&active_subscribe=0
Search: / external / search query = chto_nayti & page = 1 & type = all & sort = popularity & style = & access_token = QsbkcctJITQL5crQArpGNB09MqlEG7n3-BiqlNlZ8-4vKJPMH45spuoBvp9p62ev_5sXq4UEcaVs2xbtpX4uwUEbM31C81pggW2MCPzmLYSgQTE6LkV-1mx69Vh81B1lLCnbU0h_Nhy0EryAU1bUSdapMIX6dit-el6NqnCArsxwPBN7hh6Hmx5gLUBmJV1F & active_subscribe = 0?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question