dotfiles/macos.local/flake/home/scripts/yt-to-rss.py
2025-03-08 16:35:01 -06:00

12 lines
267 B
Python

import requests
from bs4 import BeautifulSoup
import sys
channel_link = sys.argv[1]
response = requests.get(channel_link)
soup = BeautifulSoup(response.content, "html.parser")
rss_link = soup.find("link", title="RSS")
rss_url = rss_link.get("href")
print(rss_url)