def get_url_param(self, url, key):
        return urlparse.parse_qs(urlparse.urlparse(url).query)[key][0]
>>> get_url_param("http://www.example.com/?key=1", "key")
dataset/ETHPy150Open hozn/stravalib/stravalib/tests/functional/test_client_utils.py/ClientAuthorizationUrlTest.get_url_param