Skip to content

This script gets your Youtube subscriptions and generate a urls file for Newsboat

Notifications You must be signed in to change notification settings

felipos/newsboat-url-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

newsboat-url-generator

This script gets your Youtube subscriptions and generate a urls file for Newsboat

Requirements

No one, but if you pretend to use the option that brings all your subscriptions you may want to follow the steps bellow.

  • Generate a google API key first.

  • Put your API key into config.py file.

  • You will need to find your youtube channel id through this guide (Remember, is the channel id, not the user id.)

  • Check your privacy settings. To run this script your subscriptions needs to be visible to others, so make sure the option bellow its uncheck. You can check this option again after running the script.

image

Usage Example

Importing all your subscriptions from your youtube channel id:

$ python newsboat-urls-generator.py -i UIasndj8734nAJSNasfna2 -v

Your channel id: AidnJamask82JamndkajhH
Generating for Cloth Map
Generating for TED
Generating for Computerphile

Done! A total of 3 channels written in my_urls file

The script will create a text file with the following content:

https://www.youtube.com/feeds/videos.xml?channel_id=UCs_6gVNVQOgq6MGDdt3h8HQ "Youtube" "!Cloth Map"
https://www.youtube.com/feeds/videos.xml?channel_id=UCAuUUnT6oDeKwE6v1NGQxug "Youtube" "!TED"
https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "Youtube" "!Computerphile"

"query:Youtube:tags # \"Youtube\""

Generating a newsboat URL from a any youtube channel URL

python newsboat-urls-generator.py --channel-url https://www.youtube.com/channel/UCs_6gVNVQOgq6MGDdt3h8HQ

https://www.youtube.com/feeds/videos.xml?channel_id=UCs_6gVNVQOgq6MGDdt3h8HQ "Youtube" "!Cloth Map"

Now from a URL that contains the username

python newsboat-urls-generator.py --channel-url https://www.youtube.com/user/Computerphile

https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "Youtube" "!Computerphile"

Available options

python newsboat-urls-generator.py --help

usage: newsboat-urls-generator.py [-h] [-i CHANNEL_ID] [-u CHANNEL_URL] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -i CHANNEL_ID, --channel-id CHANNEL_ID
                        your youtube channel id
  -u CHANNEL_URL, --channel-url CHANNEL_URL
                        youtube url channel to convert. needs channel
                        username.
  -v, --verbose         verbose mode

About

This script gets your Youtube subscriptions and generate a urls file for Newsboat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages