MCPcopy Index your code
hub / github.com/ccxt/ccxt / remove_hostnamefrom_url

Method remove_hostnamefrom_url

python/ccxt/test/tests_sync.py:752–768  ·  view source on GitHub ↗
(self, url)

Source from the content-addressed store, hash-verified

750 return result
751
752 def remove_hostnamefrom_url(self, url):
753 if url is None:
754 return None
755 url_parts = url.split('/')
756 res = ''
757 for i in range(0, len(url_parts)):
758 if i > 2:
759 current = url_parts[i]
760 if current.find('?') > -1:
761 # handle urls like this: /v1/account/accounts?AccessK
762 current_parts = current.split('?')
763 res += '/'
764 res += current_parts[0]
765 break
766 res += '/'
767 res += current
768 return res
769
770 def urlencoded_to_dict(self, url):
771 result = {}

Callers 1

Calls 3

splitMethod · 0.80
findMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected