code: def get_url_preview(self, url, ts=None):
          
          params = {'url': url}
          if ts:
              params['ts'] = ts
          return self._send(
              "GET", "",
              query_params=params,
              api_path="/_matrix/media/r0/preview_url"
          )
docs: Get preview for URL.
  
          Args:
              url (str): URL to get a preview
              ts (double): The preferred point in time to return
                   a preview for. The server may return a newer
                   version if it does not have the requested
                   version available.