๐๏ธโฌ๏ธ PoDownloader = Podcast Downloader, a simple CLI tool to download podcasts.
This tool will download podcast RSS, podcast cover image, episode audio files, episode cover images and episode shownotes.
You can download latest release from Releases page directly.
Make sure go is installed on your system correctly.
git clone https://github.com/LGiki/PoDownloader.git
cd PoDownloader
go mod download
go build -o podownloader ./cmd
Then you can find the output binary file named podownloader
.
Most podcast apps support exporting podcast lists in OPML format.
An example of an OPML file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>Example OPML</title>
</head>
<body>
<outline text="Example Podcast 1" title="Example Podcast 1" type="rss" xmlUrl="https://exmaple.org/podcast1/rss.xml" />
<outline text="Example Podcast 2" title="Example Podcast 2" type="rss" xmlUrl="https://exmaple.org/podcast2/rss.xml" />
<outline text="Example Podcast 3" title="Example Podcast 3" type="rss" xmlUrl="https://exmaple.org/podcast3/rss.xml" />
</body>
</opml>
This OPML file contains 3 podcasts (each outline
tag is a podcast), and the xmlUrl
attribute is the podcast RSS link.
Download podcasts from OPML file using:
podownloader download --opml /path/to/opml_file.xml
RSS links list file is a text file, one podcast RSS URL per line, for example:
https://exmaple.org/podcast1/rss.xml
https://example.org/podcast2/rss.xml
https://example.org/podcast3/rss.xml
Download podcasts from RSS links list file using:
podownloader download --list /path/to/rss_list_file.txt
podownloader download --rss https://example.org/podcast/rss.xml
Using -h
or --help
to view all options.
Use the HTTP_PROXY
environment variable to set a HTTP or SOCSK5 proxy.
Using -o
or --output
to specify output directory, default output directory is ./podcast
.
Using -u
or --ua
to specify user agent, default user agent is Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
.
Using -t
or --thread
to specify download threads, default download threads is 3
.
You can specify --log
parameter to set the log directory.
If you specify the --log
parameter, the log file will be saved to the directory you specified.
If you leave the --log
parameter empty, no log file will be generated.
Default value of --log
is empty.
If you don't want to specify parameters every time you run the program, you can save the parameters in a configuration file, the program will automatically load the parameters from the configuration file.
You can specify configuration file path using -c
or --config
:
podownloader --config ~/.podownloader.json
Default configuration file path is $PWD/.podownloader
.
Supported configuration file formats: json
, toml
, yaml
, yml
, properties
, props
, prop
, hcl
, dotenv
, env
, ini
.
An example of a configuration file in JSON format is as follows:
{
"list": "",
"opml": "/path/to/opml_file.xml",
"rss": "",
"output": "podcast",
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36",
"thread": 3
}
You can find more configuration file templates in config_template folder.
podcast
โโ podcast_1_title
โ โโ episode_1_title
โ โ โโ cover.jpg
โ โ โโ episode_1_title.mp3
โ โ โโ shownotes.html
โ โโ episode_2_title
โ โ โโ cover.jpg
โ โ โโ episode_2_title.mp3
โ โ โโ shownotes.html
โ โโ ...
โ โ โโ cover.jpg
โ โ โโ *****.mp3
โ โ โโ shownotes.html
โ โโ ...
โ โโ cover.jpg
โ โโ rss.xml
โโ podcast_2_title
โโ episode_1_title
โ โโ cover.jpg
โ โโ episode_1_title.mp3
โ โโ shownotes.html
โโ episode_2_title
โ โโ cover.jpg
โ โโ episode_2_title.mp3
โ โโ shownotes.html
โโ ...
โ โโ cover.jpg
โ โโ *****.mp3
โ โโ shownotes.html
โโ ...
โโ cover.jpg
โโ rss.xml