hozer

vkvk

May 29th, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. for i in range(0, steps):
  2.     if count > number:
  3.         count -= number
  4.     else:
  5.         number = count
  6.     offset += number
  7.     response = urllib.urlopen('https://api.vk.com/method/audio.get?uid=35642324'+\
  8.                                   '&count=' + str(number)+\
  9.                                   '&offset=' + str(offset)+\
  10.                                   '&access_token=' + token)
  11.     response = json.load(response)
  12.     audios = response['response']
  13.     for j in audios:
  14.         output.append({'aid':j['aid'],
  15.                           'artist':j['artist'],
  16.                           'title':j['title']})
  17.         glob += 1
Advertisement
Add Comment
Please, Sign In to add comment