# Use Newsboat rss reader and mpv to subscribe and play bsdnow youtube feed



## NapoleonWils0n (Sep 16, 2018)

You can use the newsboat rss reader which is a fork of newsbeuter and mpv player to subscibe to youtube channels and playlists rss feeds, like bsdnow and create a newsboat macro to open the video with mpv player and use w3m as the default browser or firefox as a secondary browser

* install newsboat, mpv and w3m-img


```
sudo pkg install newsboat mpv w3m-img
```

Create the newsboat config and urls files


```
touch ~/.newsboat/{config,urls}
```

Next we need to edit the ~/.newsboat/config file and set the default browser and keyboard macro to open mpv or firefox


```
vim ~/.newsboat/config
```

Add the code below to the ~/.newsboat/config file


```
auto-reload yes
browser "/usr/local/bin/w3m %u"
macro m set browser "/usr/local/bin/mpv %u"; open-in-browser ; set browser "/usr/local/bin/w3m %u"
macro f set browser "/usr/local/bin/firefox %u"; open-in-browser ; set browser "/usr/local/bin/w3m %u"
```

keyboard macros

The config code set the rss feeds to auto-reload when you open newsboat
Then we set the default browser to w3m

We create 2 keyboard macros, one to open mpv as the browser to play videos in rss feeds
and another keyboard macro to use firefox as the browser

the keyboard macro for mpv is set to m, and the keyboard macro for firefox is f
you execute the keyboard macro by pressing comma and then the keyboard macro letter

so to open a youtube video from an rss feed you open the post in newboat and then type comma m


```
,m
```

to open a post with firefox open the post in newsboat and then type comma f


```
,f
```

to open a post with w3m open the post in newsboat and then type o


```
o
```

add the rss feeds to ~/.newsboat/urls

* edit the ~/.newsboat/urls files


```
vim ~/.newsboat/urls
```

Next we will add the rss feed for the bsdnow playlist on youtube

The bsdnow youtube playlist url looks like this


```
https://www.youtube.com/playlist?list=PLUW3LUwQvegyqk2Iqi-YD7Do-AyD4W0s1
```

* we need to grab the code after list=
which is:


```
PLUW3LUwQvegyqk2Iqi-YD7Do-AyD4W0s1
```

We then append the playlist code to the the youtube rss feed for playlist

The youtube rss feed for playlists looks like this


```
https://www.youtube.com/feeds/videos.xml?playlist_id=
```

So the complete url we add to the ~/.newsboat/urls files looks like this


```
# bsdnow youtube playlist rss
https://www.youtube.com/feeds/videos.xml?playlist_id=PLUW3LUwQvegyqk2Iqi-YD7Do-AyD4W0s1
```

The youtube rss feed for channels looks like this


```
https://www.youtube.com/feeds/videos.xml?channel_id=
```

to get the channelid you need to go to the channels page on youtube and view source in the browser
then search for channelid and copy the code for the channelid

for example this is my youtube channel


```
https://www.youtube.com/user/NapoleonWils0n
```

and the channelid is:


```
UCriRR_CzOny-akXyk1R-oDQ
```

so the complete youtube rss feed for my channel would look like this


```
https://www.youtube.com/feeds/videos.xml?channel_id=UCriRR_CzOny-akXyk1R-oDQ
```

opening videos with mpv

so to open a youtube video from an rss feed you open the post in newboat and then type comma m


```
,m
```

newsbeuter documentation

newsboat is a fork of newbeuter


----------

