Created
November 29, 2017 19:24
-
-
Save digitalashes/c6bb2b51750f26609985cb0269d9af26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def url(self, url): | |
""" | |
An internal method for build url | |
""" | |
endpoint_url = provider['url'].replace('{format}', data_format) | |
scheme, netloc, path, qs, fragment = urlsplit(endpoint_url) | |
query_params = OrderedDict(parse_qsl(qs)) | |
query_params['url'] = url | |
if self._params: | |
query_params.update(self._params) | |
query_params = urlencode(query_params, True) | |
return urlunsplit((scheme, netloc, path, query_params, fragment)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment