Javascript Create Url From Function Python