My utility format the feed url by extracting the relevant suffix from the url slug when it includes:
"/user/"
"/channel/"
"/playlist?list="
I think the newer slug format for channels is "/c/" in which case I think you do have to extract it from the HTML source, but they now include the feed URL anyway.
<link rel="alternate" type="application/rss+xml" title="RSS" href="FEED_URL">