Skip to content

Commit cb97a58

Browse files
committed
Check 429 pass is successful
1 parent 6ef5b16 commit cb97a58

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

vk_api/vk_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ def _vk_login(self, captcha_sid=None, captcha_key=None):
260260
hash429_md5 = md5(self.http.cookies['hash429'].encode('ascii')).hexdigest()
261261
self.http.cookies.pop('hash429')
262262
response = self.http.get(f'{response.url}&key={hash429_md5}')
263+
if not response.url.startswith('https://vk.com/login'):
264+
raise AuthError('Could not pass 429.html')
263265

264266
headers = {
265267
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',

0 commit comments

Comments
 (0)