MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / join_link

Function join_link

botasaurus/cl.py:296–310  ·  view source on GitHub ↗
(link, path=None, query_params=None)

Source from the content-addressed store, hash-verified

294
295
296def join_link(link, path=None, query_params=None):
297 from urllib.parse import urlencode
298
299 if path:
300 prepend = link.rstrip("/")
301 href = path.lstrip("/")
302
303 link = f"{prepend}/{href}"
304 else:
305 link = link
306
307 if query_params:
308 query_params = urlencode(query_params)
309 link = f"{link}?{query_params}"
310 return link
311
312
313def join_dicts(*dicts):

Callers 1

clean_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected