Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def buildUrl(host, path, args):
- finalUrl = str(host) + "/"
- for arg in path:
- finalUrl += str(arg) + "/"
- if args is not None:
- finalUrl += "?"
- for arg in args:
- finalUrl += str(arg) + "=" + str(args[arg]) + "&"
- with open("logs.log", 'a+', encoding="utf-8") as outfile:
- json.dump(
- {
- "url": finalUrl,
- "args": args,
- }
- , outfile, indent=4, ensure_ascii=False)
- return finalUrl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement