import re
from pathlib import Path

def get_channel_info(channel_url):
    if '@' in channel_url:
        channel_name = channel_url.split('@')[1].split('/')[0]
        channel_id = f"@{channel_name}"
    else:
        channel_name = "unknown_channel"
        channel_id = "unknown_channel"
    channel_name = re.sub(r'[<>:"/\\|?*]', '_', channel_name)
    return channel_name, channel_id

def get_playlist_info(playlist_url):
    return get_channel_info(playlist_url) 