We get music through third-party API

 3r3196. 3r3-31.

This time it started after closing methods audio in the execute method.

I decided to see how the sites that provide music can be downloaded. I was interested in the site 3r3677. vrit.me
. 3r3181.  3r3196. I climbed into the network tab and saw an interesting query:
 3r3196.
3r3122. photo [/b] 3r3124. We get music through third-party API 3r3181.  3r3196. 3r3181.  3r3196. 3r3173. 3r3174. import json, requests
s = requests.post ("https://vrit.me/data.php", data = {3r3196. "method": "audio.get",
"count": ?00?00?00? 3r3196. "offset": 0 ,
"User_id": - 52922518})
s = json.loads (s.text)
print (s)
3r33177. 3r3178. 3r3181.  3r3196. As a result, I received the following answer: 3r3181.  3r3196. 3r3173. {'response': {'count': ? 'items':[{'id': 456239018, 'owner_id': -52922518, 'artist': 'CORVUS', 'title': 'Осеннее смятение[ЗС]',' Duration ': 12?' date ': 147419463?' url ':' https://cs1-81v4.vkuseraudio.net/p18/894f30b49d3571.mp3?extra=5xovvbyqXrdr0Ixl9FLteg-pRRC29pGr_yO8mDgqNN_4kLlxJe1gHST8S8bVy2IQt0wYFAC1tMCnF7p5ujeB7K1jFPfYSCaEuxjh5P92VT81AMd9AlIJx2GQp613xHxCRbXCynv6fqdhFcPwvyZaRvg ',' lyrics_id ': ???? 'genre_id': 1? 'is_licensed': True, 'is_hq': True, 'track_genre_id': 1? 'access_key': '7b762a5b22b452d0ca'}, {'id': 45623901? 'owner_id': -5292251? 'artist' : 'CORVUS', 'title': 'Notes of the Madman[ЗС]',' Duration ': 13?' date ': 147047469?' url ':' https://cs1-81v4.vkuseraudio.net/p4/7f6c08b134e0a7.mp3?extra=MgBr8oDpO-7f2l_qmtHZGAMD608vcqWxA8OLNgcyZDdA8aVc2Jlj9bDW48FW8S5zDA9jO-geAEUaF_LvFUP_DFiGZEFo-5B92YhcMYMpyuvi6tFt_nO4QVwjJjNhG-Ln3dOfkC4KY2Cywk_attG5fSQ ', 'lyrics_id': 37029111? 'genre_id': 1? 'is_licensed': True, 'is_hq': True, 'track_genre_id': 1? 'access_key': '8717a672801e7a15fa'}]}}
3r3181.  3r3196. BUT! because Any link to the audio is linked to the computer’s IP address, 3r3181.  3r3196. 3r3181.  3r3196. Then I finally decided to see how on the site itself vrit.me generated link. It turned out that this link is substituted in 3r371. another [/b] the link and as a result, the output is a link like 3r3181.  3r3196. 3r3173. https://vrit.me/download?artist=Егор Creed & title = it & url = https: //cs1-60v4.vkuseraudio.net/p20/6d11e54193b7e0.mp3 extra = CZi_FWKxxoYdOTg7Sz4cksgJ_l12bqsxH8wZFPRoN6t7qf4at_MDouTA6MDmsLiaoFrDJDswVzKozagVNVCskf3LiR3ry-JvP9WHgisWn7nq7BradXYcffgAlQH2VTWoTFDgpVwhdRZMUV6ATpr6KQ
?. 3r3181.  3r3196. 3r3181.  3r3196. 3r3181.  3r3196. That is, we just need to “enter” the received link into another link. Implementation: 3r3181.  3r3196. 3r3173. 3r3174. for i in range (len (data["response"] ["items"])):
url = data["response"] ["items"] [i] ["url"]3r3196. title = data["response"] ["items"] [i] ["title"]3r3196. artist = data["response"] ["items"] [i] ["artist"]3r3196. data["response"] ["items"] [i] ["url"]= "https://vrit.me/download?title={title palm&artist= subdateartist&&ll=ERTurl"".format(url=url,title=title,artist=artist)
3r33177. 3r3178. 3r3181.  3r3196.

Other methods with audio are

3r3181.  3r3196. I also tried to call methods such as “audio.getById”, “audio.search”, “audio.getCount”, “audio.getLyrics”, “audio.getAlbums”, but only one of them works “audio.search”, and This is not possible to search by user’s music, only in a global search. Cod:
 3r3196. 3r3173. 3r3174. s = requests.post ("https://vrit.me/data.php", data = {3r3196. "method": "audio.search",
"count": ?
"offset": 0 ,
"Q": q})
data = json.loads (s.text)
if "response" in dаta:
data = data["response"]3r3196. for i in range (len (data["items"])):
url = data["items"] [i] ["url"]3r3196. title = data["items"] [i] ["title"]3r3196. artist = data["items"] [i] ["artist"]3r3196. data["items"] [i] ["url"]= "https://vrit.me/download?title={title}&artist={artist and&url=ERTurl"".format(url=url,title=title,artist=artist) 3r3178. 3r3181.  3r3196. The final code:
3r3122. code [/b] 3r3124. 3r3173. 3r3174. import requests, json
class audio ():
def get (owner_id):
s = requests.post ("https://vrit.me/data.php", data = {3r3196. "method": "audio.get",
"count": ?00?00?00? 3r3196. "offset": 0 ,
"User_id": owner_id})
data = json.loads (s.text)
if "response" in dаta:
data = data["response"]3r3196. 3r3196. for i in range (len (data["items"])):
url = data["items"] [i] ["url"]3r3196. title = data["items"] [i] ["title"]3r3196. artist = data["items"] [i] ["artist"]3r3196. data["items"] [i] ["url"]= "https://vrit.me/download?title={title&&artist={artist&&ll={url}" .format (
url = url,
title = title, artist = artist)
return data
def search (q):
s = requests.post ("https://vrit.me/data.php", data = {3r3196. "method": "audio.search",
"count": 30?
"offset": 0 ,
"Q": q})
data = json.loads (s.text)
if "response" in dаta:
data = data["response"]3r3196. for i in range (len (data["items"])):
url = data["items"] [i] ["url"]3r3196. title = data["items"] [i] ["title"]3r3196. artist = data["items"] [i] ["artist"]3r3196. data["items"] [i] ["url"]= "https://vrit.me/download?title={title&&artist={artist&&ll={url}" .format (
url = url,
title = title, artist = artist)
return data 3r3178. 3r3181.  3r3196. 3r3192. 3r3192. 3r3181.  3r3196. You can call this class like this:
 3r3196. 3r3173. 3r3174. import bot_vk # pip install bot_vk == ???r3r3196. info1 = bot_vk.audio.get (owner_id = 1234567)
info2 = bot_vk.audio.search (q = "imagine dragons") 3r3178. 3r3181.  3r3196. 3r3181.  3r3196. 3r3183. ATTENTION! The author of this post is not responsible for any of your actions. This post is created for informational purposes only! 3r3184. 3r3192. 3r3196. 3r3196. 3r3196. 3r3189. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3190. 3r3196. 3r3192. 3r3196. 3r3196. 3r3196. 3r3196.
+ 0 -

Add comment