aboutsummaryrefslogtreecommitdiff
path: root/blog/youtube_to_rss.md
diff options
context:
space:
mode:
Diffstat (limited to 'blog/youtube_to_rss.md')
-rw-r--r--blog/youtube_to_rss.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/blog/youtube_to_rss.md b/blog/youtube_to_rss.md
new file mode 100644
index 0000000..8b414e1
--- /dev/null
+++ b/blog/youtube_to_rss.md
@@ -0,0 +1,56 @@
+# Convert your Youtube subsciptions to RSS feeds
+
+> Fun fact: I'm such a zoomer that I only discovered RSS recently (which is [years] old).
+
+## Get all subscription
+
+You probably could do some fancy stuff with the google API but it would probably be overkill.
+Go to <https://youtube.com/feed/channels>, scroll to the bottom (Good luck if you got 1000+, your middle finger wight get cramped).
+Right click on something that is not a link or an image and select `Save as`, give a name to the file and save it.
+
+## Parse list of subscription
+
+Now let's get a tiny bit fancy with Python and BeautifulSoup.
+
+Download Python from [here](https://www.python.org/downloads/) (If you're on Linux, you can install it from your package manager). Make sure you install Python3.\* and not Python2.
+
+Download BeautifulSoup with pip `pip3 install bs4` (sure?)
+
+```python
+#!/usr/bin/env python3
+
+
+from bs4 import BeautifulSoup
+
+BeautifulSoup(content)
+
+...
+```
+
+You can download this script [here](extract_channels.py),
+it's a bit different from the one in this article,
+read the code before running it if you want to make sure their isn't any shenenigans.
+
+```
+$ curl -O https://cacharle.xyz/blog/extract_channels.py
+$ chmod +x extract_channels.py
+$ ./extract_channels.py < channels.html
+```
+
+## Choose the channel to add to your feeds
+
+Now comes the tedious and cringing part where you need to through aaaall your old and obscure subscription and filter the bad ones out.
+> Protip: If you want to automate this part you can ask Google to do it for you since they know you better than yourself by now.
+
+## Get channel feed
+
+I guess most RSS reader understand the HTML /balise/ `<link rel="alternate" type="application/rss" .../>` but [newsboat]() (which I use) doesn't unfortunatly.
+We can get the url to a channel feed with a simple `curl` into `grep`.
+
+```
+curl <CHANNEL_URL> | grep -E '<link rel="alternate".*rss/>
+```
+
+## Sources
+
+* [luke smith]()