tribler.core.libtorrent.uris ============================ .. py:module:: tribler.core.libtorrent.uris Attributes ---------- .. autoapisummary:: tribler.core.libtorrent.uris.logger Functions --------- .. autoapisummary:: tribler.core.libtorrent.uris.url_to_path tribler.core.libtorrent.uris.unshorten tribler.core.libtorrent.uris.get_url Module Contents --------------- .. py:data:: logger .. py:function:: url_to_path(file_url: str) -> str Convert a URL to a path. For example: .. code-block:: 'file:///path/to/file' -> '/path/to/file' :param file_url: the URL for a file. :returns: the filesystem path for the file. .. py:function:: unshorten(uri: str) -> tuple[str, bool] :async: Unshorten a URI if it is a short URI. Return the original URI if it is not a short URI. :param uri: A string representing the shortened URL that needs to be unshortened. :return: The unshortened URL, or the URL if not redirected, and whether the certificate is valid. .. py:function:: get_url(url: str) -> bytes :async: Get the body of the given URL.