From 81a651851d9ba50c8f789374ca716d2ca26db5f0 Mon Sep 17 00:00:00 2001 From: Ralph Embree Date: Sat, 19 Nov 2016 14:12:14 +0000 Subject: [PATCH] Fix login bug The same as the last: If the protocol is included in the link, there will be an error --- chatexchange/browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatexchange/browser.py b/chatexchange/browser.py index 45efda9..97662dd 100644 --- a/chatexchange/browser.py +++ b/chatexchange/browser.py @@ -223,7 +223,7 @@ def _load_user(self, soup): @staticmethod def user_id_and_name_from_link(link_soup): user_name = link_soup.text - user_id = int(link_soup['href'].split('/')[2]) + user_id = int(link_soup['href'].split('/')[-2]) return user_id, user_name def _update_chat_fkey_and_user(self):