Skip to content

Commit

Permalink
Merge pull request #5 from istudyatuni/fix-hash-regex
Browse files Browse the repository at this point in the history
Update regex
  • Loading branch information
Aragroth authored Jan 17, 2021
2 parents 007f647 + 16491fd commit e3336ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vk_messages/vk_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def two_factor_auth(self):
response = self.main_session.get(f'https://vk.com/login?act=authcheck',
cookies=self.main_session.cookies.get_dict())

hash_url = re.findall(r"hash: '(\S*)'},", str(response.text))
hash_url = re.findall(r"\"hash\":\s{0,}\"(\S*)\"},", str(response.text))
if hash_url == []:
raise Exception_MessagesAPI('Invalid login data or wrong auth method', 'LoginError')
hash_url = hash_url[0]
Expand Down

0 comments on commit e3336ba

Please sign in to comment.