diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-03-08 16:35:01 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-03-08 16:35:01 -0600 |
commit | c8c3ad82a54dcaf84850b713e296306071c61f98 (patch) | |
tree | 10365805516498c40d0b9a8df8f5a8a8c4759d00 /macos.local/flake/home/scripts/yt-to-rss.py.org | |
parent | 93c1e9e304831ff7d07f9395ee0c9ff329861d0e (diff) |
system changes
Diffstat (limited to 'macos.local/flake/home/scripts/yt-to-rss.py.org')
-rw-r--r-- | macos.local/flake/home/scripts/yt-to-rss.py.org | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/macos.local/flake/home/scripts/yt-to-rss.py.org b/macos.local/flake/home/scripts/yt-to-rss.py.org new file mode 100644 index 0000000..619c6dd --- /dev/null +++ b/macos.local/flake/home/scripts/yt-to-rss.py.org @@ -0,0 +1,19 @@ +#+title: YouTube Channel to RSS Link + +Quick script to get the RSS link for a YouTube channel so I don't have to visit the website. + +#+begin_src 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) + +#+end_src |