mirror of
https://github.com/tropicoo/yt-dlp-bot.git
synced 2025-03-01 17:23:25 +08:00
Refactor
This commit is contained in:
parent
99edf37523
commit
2fec9e446f
1 changed files with 2 additions and 3 deletions
|
@ -66,10 +66,9 @@ class MediaService:
|
|||
raise
|
||||
return media
|
||||
|
||||
def _get_host_conf(self, url: str) -> AbstractHostConfig:
|
||||
@staticmethod
|
||||
def _get_host_conf(url: str) -> AbstractHostConfig:
|
||||
host_to_cls_map = HostConfRegistry.get_host_to_cls_map()
|
||||
self._log.info('Registry: %s', HostConfRegistry.get_registry())
|
||||
self._log.info('Host to CLS map: %s', host_to_cls_map)
|
||||
host_cls = host_to_cls_map.get(urlsplit(url).netloc, host_to_cls_map[None])
|
||||
return host_cls(url=url)
|
||||
|
||||
|
|
Loading…
Reference in a new issue