direct youtube id is now ok

This commit is contained in:
jr-k 2024-05-13 13:07:54 +02:00
parent a500fb6946
commit 0dd8571d4b

View File

@ -159,7 +159,10 @@ def get_ip_address() -> Optional[str]:
return None return None
def get_yt_video_id(url: str) -> str: def get_yt_video_id(url_or_id: str) -> str:
if len(url_or_id) == 14:
return url
if not url.startswith('http'): if not url.startswith('http'):
url = 'http://' + url url = 'http://' + url