Twitter location data handling
Something I ran into testing the Flask example and logging in via Twitter. If you're like me, and only had your city in the location field (i.e., Perth, instead of Perth, Australia), this would cause Authomatic to bomb out the login with the error below originating from line 659 of oauth1.py.

_city, _country = _location.split(',')
ValueError: need more than 1 value to unpack

diff --git a/authomatic/providers/oauth1.py b/authomatic/providers/oauth1.py
index b9443f8..1869453 100644
--- a/authomatic/providers/oauth1.py
+++ b/authomatic/providers/oauth1.py
@@ -836,6 +836,16 @@ class Twitter(OAuth1):
         user.picture = data.get('profile_image_url')
         user.locale = data.get('lang')
         user.link = data.get('url')
+        _location = data.get('location', '')
+        if _location:
+            user.location = _location.strip()
+            _split_location = _location.split(',')
+            if len(_split_location) > 1:
+                _city, _country = _split_location
+                user.country = _country.strip()
+            else:
+                _city = _split_location[0]
+            user.city = _city.strip()
         return user
 
 
['authomatic/providers/oauth1.py']