Kaydet (Commit) aac494c6 authored tarafından Ali Rıza KESKİN's avatar Ali Rıza KESKİN

url encode

üst 0b8de7b2
......@@ -90,3 +90,16 @@ def join_path(a, *p):
def basename(path):
# os.path.basename is not usefull for remote links
return path.split("/")[-1]
def url_encode(url):
if "?" not in url:
return url
getx = "?"
for i in get:
if not i.isalnum():
getx += "%"+str(hex(ord(i))).split("x")[1]
getx += i
return "{}{}".format(head,getx)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment