There is a script that gets data from
vk.com/al_friends.php. Empirically is established that it is only necessary cookies remixsid. Trying to get instructions from the Internet (use requests):
auth_params = {'act': 'login', 'email': 'soap', 'pass': 'password'}
r = requests.get('http://login.vk.com', params=auth_params)
# at this stage all is well, returns the user page as if logged in
# next you need to option __q_hash. It (the manual) pull from the page:
parse_hash = re.search('hash=([a-z0-9]+)', r.text)
hash = parse_hash.group(1)
# the only place where the hash= in the page code — link "exit" (https://login.vk.com/?act=logout&hash=...)
# now we need to make a request to vk.com/login.php using the resulting hash:
auth_params = {'act': 'slogin', 'role': 'fast', 'redirect': '1', 'to': ", 's': '1', '__q_hash': hash}
r = requests.get('http://vk.com/login.php', params=auth_params)
# and now the bummer, the page with the login form. Although the manual we need to get out of it remixsid (again, regexport from the code page)
Tried specifying the user-agent ('User-Agent': 'Mozilla/5.0' — going straight to the mobile version) and without (gives the full version).
Actually, the question is — what's wrong? Or have I misunderstood, or authorization have changed, and __q_hash now different to need.
Also welcome suggestions for alternative way of getting remixsid (copy to browser not to offer, I want full autonomy :-)
Half a year ago I did a program for Android and have tested getting friends with token and one without. With the token base was 20% more for this and decided to request a list with the token. - geraldine91 commented on October 3rd 19 at 04:25