Javascript Create Url From Function Python Code