manolomartinez / greg

A command-line podcast aggregator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to parse buzzsprout buffer of type audio/mpeg

smoorg opened this issue · comments

Buzzsprout does not provide permalink to physical file, instead it provides media player embeded into the rss. Unfortunately greg is not able to deal with such media. I got "...something went wrong. Are you connected to the internet?". I am far from python dev so couldn't investigate it on my own, but maybe someone knows how to deal with that kind of issue.

Example podcast: https://feeds.buzzsprout.com/1263722.rss
$ greg add test -f https://feeds.buzzsprout.com/1263722.rss
$ greg check -f test
$ greg download 0
...something went wrong. Are you connected to the internet?

Hi, apparently buzzsprout doesnt want to allow scripts to download its files. The way greghandles downloads by default is by using the urllib library, which identifies its requests with the User-Agent' "Python-urllib/3.5" (in python 3.5; see this).

Fortunately, you don't need to use the default download handler. Add this to your greg.conf:

[test]

downloadhandler = wget {link} -O {directory}/{filename}.mp3

This will use wget to download your podcasts, which buzzsprout is apparently OK with. You'll need to install wget for this to work, of course. If you prefer curl or some other downloader you can use them too.

Closing this for now, but feel free to reopen it if this didn't solve your issue.

Manolo