manolomartinez / greg Goto Github PK
View Code? Open in Web Editor NEWA command-line podcast aggregator
License: GNU General Public License v3.0
A command-line podcast aggregator
License: GNU General Public License v3.0
Hi,
I'm on Debian and Python 2.7. After doing sudo python setup.py install
and trying to run greg, I got this error:
File "/usr/local/bin/greg", line 19, in <module>
from greg.gregparser import main
ImportError: No module named greg.gregparser
I tried running greg.py from the /greg/greg folder, but that gave another error:
File "greg.py", line 185
print (feed, end=" ")
^
SyntaxError: invalid syntax
Also, I had to add # coding=utf-8
to both setup.py and then to /usr/local/bin/greg. Without this, I got the following error:
SyntaxError: Non-ASCII character '\xc3' in file setup.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Here's my entire log:
mart@mart:~/downloads/greg$ sudo python setup.py install
running install
running build
running build_py
package init file 'greg/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/greg
copying greg/gregparser.py -> build/lib.linux-i686-2.7/greg
copying greg/greg.py -> build/lib.linux-i686-2.7/greg
package init file 'greg/__init__.py' not found (or not a regular file)
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/greg -> build/scripts-2.7
changing mode of build/scripts-2.7/greg from 644 to 755
running install_lib
creating /usr/local/lib/python2.7/dist-packages/greg
copying build/lib.linux-i686-2.7/greg/gregparser.py -> /usr/local/lib/python2.7/dist-packages/greg
copying build/lib.linux-i686-2.7/greg/greg.py -> /usr/local/lib/python2.7/dist-packages/greg
byte-compiling /usr/local/lib/python2.7/dist-packages/greg/gregparser.py to gregparser.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/greg/greg.py to greg.pyc
SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.7/dist-packages/greg/greg.py', 183, 25, ' print (feed, end=" ")\n'))
running install_scripts
copying build/scripts-2.7/greg -> /usr/local/bin
changing mode of /usr/local/bin/greg to 755
running install_data
copying data/greg.conf -> /etc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/Greg-0.1.0.egg-info
mart@mart:~/downloads/greg$ cd ~
mart@mart:~$ greg
Traceback (most recent call last):
File "/usr/local/bin/greg", line 19, in <module>
from greg.gregparser import main
ImportError: No module named greg.gregparser
Thanks for any help!
Based on the readme, it appears to be a perfect tool for me, though. So another thanks for your effort! :)
https://pypi.python.org/pypi/Greg is still on 0.3.0 and it would be nice to have an update to 0.4.0 including the latest commit: 4f8b59e
let me know is there anything I can do to help make this happen.
thanks again for this great tool!!
Maybe it could be checked before the download starts, if a podcast-file is already existing in the download folder?
Greg seems to be just the program I am looking for but I can't get it to download anything.
I've installed both the "greg-git" and "greg" packages from the Arch User Repository and everything works fine until I type "greg download 1" (or any number). This is the output I receive:
Traceback (most recent call last):
File "/usr/bin/greg", line 18, in
main()
File "/usr/lib/python3.4/site-packages/greg/gregparser.py", line 103, in main
args.func(vars(args))
File "/usr/lib/python3.4/site-packages/greg/greg.py", line 855, in download
feed.download_entry(entry)
File "/usr/lib/python3.4/site-packages/greg/greg.py", line 287, in download_entry
for mimetype in self.mime]):
File "/usr/lib/python3.4/site-packages/greg/greg.py", line 287, in
for mimetype in self.mime]):
File "/usr/lib/python3.4/site-packages/feedparser.py", line 375, in getitem
return dict.getitem(self, key)
KeyError: 'type'
The only thing that means anything to me is "mime". I left the mime option as the default audio setting in the configuration file. Specifically: mime = audio
Thanks for taking the time to make this application for me to use.
Hi there,
I just thought it might be useful to implement a -q
or --quiet
switch that turns off all output except for errors. I intend to run greg from cron, so while I could just redirect the standard output to /dev/null
I think a specific switch for this seems more "clean". Most other downloading programs like wget (-q
) or curl (-s
) have such a switch, too.
Vale,
Quintus
Just trying out greg for the first time here, this url: http://www.revolutionspodcast.com/rss.xml
greg only gets downloads "4.10- The Third Commission", but 10 episodes are listed with greg check
.
Also, greg download
doesn't manage to get them either. (by the way, how does greg download know which feed to select from?)
Hey,
first of all thanks for the great tool.
With this feed:
[Latzel]
url = http://www.st-martini.net/rss/podcast/stm-predigten.xml
date_info = available
download with "greg download 1-315" works fine. However when trying "greg sync Latzel" greg returns:
Checking Latzel...
Traceback (most recent call last):
File "/sw/bin/greg", line 9, in
load_entry_point('Greg==0.4.6', 'console_scripts', 'greg')()
File "/sw/lib/python3.5/site-packages/greg/gregparser.py", line 118, in main
function(vars(args))
File "/sw/lib/python3.5/site-packages/greg/greg.py", line 768, in sync
feed.fix_linkdate(entry)
File "/sw/lib/python3.5/site-packages/greg/greg.py", line 261, in fix_linkdate
entry.linkdate = list(entry.published_parsed)
TypeError: 'NoneType' object is not iterable
I use a Mac with python-pip 8.10 .
Any ideas?
Thanks in advance
Martin
I'm finding a few podcasts that I download that have track numbers in them, for some reason, that I don't want. I tried setting the tag_track to an empty string, but that causes an error. Is there a way to wipe unwanted id3 tags in downloaded files?
I could see two ways of doing this:
Stagger is not able to tag some mp3, for example podcasts from "France Inter", because of wrong duplicate frame escape.
Corrected in pull request staggerpkg/stagger#45
It would be nice to have homebrew package for greg.
Hi there,
I’m trying to use Greg for synchronising this feed: http://www.jurafunk.de/assets/podcasts/jurafunk.xml
Feed information:
% greg info
Jurafunk
--------
url: http://www.jurafunk.de/assets/podcasts/jurafunk.xml
Next sync will download from: 01 Mar 2014 16:45:23.
Binärgewitter
-------------
url: http://feeds.feedburner.com/binaergewitter-podcast-opus?format=xml
Next sync will download from: 28 Feb 2014 00:00:00.
When I try to sync that feed, I always get this:
% greg sync
I cannot parse the time information of this feed. I'll use your current local time instead.
Checking Jurafunk...
And Greg starts to download ALL entries and the MP3 files (which are over 100 and which is definitely not what I want).
Greg version is 0.3.0.
Vale,
Quintus
When i try to sync my feeds with 'greg sync', i get this error :
Traceback (most recent call last):
File "/usr/bin/greg", line 18, in
main()
File "/usr/lib/python3.3/site-packages/greg/gregparser.py", line 103, in main
args.func(vars(args))
File "/usr/lib/python3.3/site-packages/greg/greg.py", line 698, in sync
feed = Feed(session, target, None)
File "/usr/lib/python3.3/site-packages/greg/greg.py", line 117, in init
self.sync_by_date = self.has_date()
File "/usr/lib/python3.3/site-packages/greg/greg.py", line 197, in has_date
if session.feeds[name]["date_info"] == "not available":
File "/usr/lib/python3.3/configparser.py", line 1220, in getitem
raise KeyError(key)
KeyError: 'date_info'
And if i download with 'greg download 1', i get this :
... something went wrong.Are you sure your last greg check went well?
Thank for your help
Rwangum
(I will be very embarrassed if I've reported two non-issue issues in two days, but still...)
Greg was working fine for me yesterday. However now I'm suddenly getting the following when running 'greg sync':
Traceback (most recent call last):
File "/usr/bin/greg", line 9, in
load_entry_point('Greg==0.4.6', 'console_scripts', 'greg')()
File "/usr/lib/python3.5/site-packages/greg/gregparser.py", line 118, in main
function(vars(args))
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 757, in sync
feed = Feed(session, target, None)
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 114, in init
self.podcast = parse_podcast(session.feeds[feed]["url"])
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 433, in parse_podcast
podcast = feedparser.parse(url)
File "/usr/lib/python3.5/site-packages/feedparser.py", line 3957, in parse
saxparser.parse(source)
File "/usr/lib/python3.5/site-packages/drv_libxml2.py", line 190, in parse
_d(reader.LocalName()))
File "/usr/lib/python3.5/site-packages/drv_libxml2.py", line 70, in _d
return _decoder(s)[0]
File "/usr/lib/python3.5/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
TypeError: a bytes-like object is required, not 'str'
Just to check, I created a fresh set of configuration files and added a single previously-working podcast (http://theblacktapes.libsyn.com/rss), but get the same error. This is under Arch Linux, and I may have done an update yesterday, but don't remember specifically which python packages (if any) might have been updated.
I've encountered an issue with the "SpyCast" feed (url: http://feeds.spymuseum.org/spycast/ ) that prevents greg from 'sync'ing. It throws this error:
Checking SpyCast...
Traceback (most recent call last):
File "/usr/local/bin/greg", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.4/dist-packages/greg/gregparser.py", line 112, in main
args.func(vars(args))
File "/usr/local/lib/python3.4/dist-packages/greg/greg.py", line 752, in sync
feed.fix_linkdate(entry)
File "/usr/local/lib/python3.4/dist-packages/greg/greg.py", line 252, in fix_linkdate
entry.linkdate = list(entry.published_parsed)
TypeError: 'NoneType' object is not iterable
I have been able to download individual episodes from this podcast successfully with greg. I also have a -d date set on it, though I have the same date set on several other feeds and they don't exhibit this problem. It looks like greg is having trouble parsing a date -- is this yet-another-quirky-feed?
I suggest in this comment, you may bee add plugin system.
You seem to be interested in it.
I create this issue just for note forget.
It seem that "firstsync = 0" doesn't work, it would be nice to have the first sync download nothing.
As I am up to date with my podcasts I don't see the need to download them once more.
Thanks for this nice piece of software.
`
~ % cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus (development branch)"
~ % which greg
.local/bin/greg
`
~ % greg list Traceback (most recent call last): File ".local/bin/greg", line 9, in <module> load_entry_point('Greg==0.4.6', 'console_scripts', 'greg')() File "/home/swadnerkar/.local/lib/python3.5/site-packages/greg/gregparser.py", line 118, in main function(vars(args)) File "/home/swadnerkar/.local/lib/python3.5/site-packages/greg/greg.py", line 734, in list_for_user session = Session(args) File "/home/swadnerkar/.local/lib/python3.5/site-packages/greg/greg.py", line 55, in __init__ self.data_dir = self.retrieve_data_directory() File "/home/swadnerkar/.local/lib/python3.5/site-packages/greg/greg.py", line 95, in retrieve_data_directory config.read([config_filename_global, self.config_filename_user]) File "/usr/lib/python3.5/configparser.py", line 696, in read self._read(fp, filename) File "/usr/lib/python3.5/configparser.py", line 1012, in _read for lineno, line in enumerate(fp, start=1): File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)
Thanks for pushing the update to pypi, However I encounter the following problem:
When I run greg I'll see the following:
bash: /usr/local/bin/greg: /bin/python3: bad interpreter: No such file or directory
when using 'greg download' after 'greg check' it was saving all the files using localtime. I noticed because I use the {date} placeholder to save filenames. sync() uses the published date, so I looked into the download() function and it looks like it just sets entry.linkdate to the localtime without checking for entry.published_parsed or entry.updated_parsed. sync() does check for those, so I basically just copied the snippet from sync() to download() and it seems to be setting {date} correctly now. If there was another reason for setting entry.linkdate to localtime that I'm overlooking, please let me know,
Hey, @FilipBB, can you help me understand why something like this is needed? What it brings that greg currently cannot do?
I was thinking that perhaps with a bit extra work I could make something more general than a mere add-on for YT. Once I understand what it is doing.
Hi, I would like to be able to set a custom download handler based on mime-type (and/or per feed). Reason:
This is probably possible by playing with the download handler, but it would be useful to have a post-download action for files. I can imagine all sorts of uses for this, but my planned use was so that new episodes could automatically be added to the playlist of an external player.
Traceback (most recent call last):
File "/home/nick/.local/bin/greg", line 9, in <module>
load_entry_point('Greg==0.4.5', 'console_scripts', 'greg')()
File "/home/nick/.local/lib/python3.4/site-packages/greg/gregparser.py", line 117, in main
args.func(vars(args))
File "/home/nick/.local/lib/python3.4/site-packages/greg/greg.py", line 629, in add
with open(session.data_filename, 'w') as configfile:
IsADirectoryError: [Errno 21] Is a directory: '/home/nick/.local/share/greg/data'
Currently if I use greg list
the output looks like the following:
$ greg list
The History Of Rome Hardcore History Revolutions Radiolab History Extra BBC World War One Rex Factor The History of WWII Podcast Stuff You Missed in History Class The History of England Norman Centuries Hoor! Geschiedenis
It is not possible to distinguish the names from each other as I use spaces in podcast names.
It would be great if greg list
output could be changed to output names on separate lines, which would make the above readable and easily parse-able by a program, if anybody would be so inclined.
I looked through the code: it would only require removing the end=" "
argument to print()
here.
Hi there,
since my last update of greg a few days ago my previously working configuration fails. Specifically, on sync greg prints this message:
% greg sync Jurafunk
Checking Jurafunk...
Downloading Jurafunk Nr. 115: Kachelmann vs Schwarzer, Impressum bei Xing, Speicherung IP-Adressen und Hasseröder Männer-Camp -- jurafunk20140728.mp3
'/srv/cifs/multimedia/Podcasts/Jurafunk/Jurafunk Nr. 115: Kachelmann vs Schwarzer, Impressum bei Xing, Speicherung IP-Adressen und Hasseröder Männer-Camp: Datei oder Verzeichnis nicht gefunden
Done
"Datei oder Verzeichnis nicht gefunden" is German for "file or directory not found".
Checking the directory /srv/cifs/multimedia/Podcasts/Jurafunk I found the file is not there. Nevertheless greg marked it as downloaded so it never retries the failed download; each time I manually delete the faulty entry from ~/.local/share/greg/data/Jurafunk the syncing operation fails again.
The relevant part of my ~/.config/greg/greg.conf looks like this:
[DEFAULT]
# Double % needed, bug in Greg?
date_format = %%Y
Data directory = ~/.local/share/greg/data
Download directory = /srv/cifs/multimedia/Podcasts/
Create subdirectory = yes
subdirectory_name = {podcasttitle}
Tag = no
tag_artist = {podcasttitle}
tag_title = {title}
tag_genre = Podcast
firstsync = 2
mime = audio
downloadhandler = wget {link} -P '{directory}'
[Jurafunk]
downloadhandler = wget '{link}' -q -O '{directory}/{title} ({date}).mp3'
Greg version is 0.4.2.
Vale,
Quintus
Hello,
Quite often while downloading an episode i encounter the following error
Checking lineardigressions...
Downloading Kalman Runners -- 230576907-linear-digressions-kalman-runners.mp3
Traceback (most recent call last):
File "/home/username/.local/bin/greg", line 11, in <module>
sys.exit(main())
File "/home/username/.local/lib/python3.5/site-packages/greg/parser.py", line 138, in main
function(vars(args))
File "/home/username/.local/lib/python3.5/site-packages/greg/commands.py", line 176, in sync
downloaded = feed.download_entry(entry)
File "/home/username/.local/lib/python3.5/site-packages/greg/classes.py", line 329, in download_entry
aux.download_handler(self, placeholders)
File "/home/username/.local/lib/python3.5/site-packages/greg/aux_functions.py", line 223, in download_handler
urlretrieve(placeholders.link, placeholders.fullpath)
File "/usr/lib/python3.5/urllib/request.py", line 217, in urlretrieve
block = fp.read(bs)
File "/usr/lib/python3.5/http/client.py", line 448, in read
n = self.readinto(b)
File "/usr/lib/python3.5/http/client.py", line 488, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
Is this an error with greg or the podcast website?
Let's say I already have a podcast "A.mp3"
I download it again through greg, which will names the new file "A.mp3_". At this point everything is fine.
But if tags are activated, then it is the "A.mp3" which is altered and not the "A.mp3_" downloaded file.
For example, i had that file (0 size):
-rw-r--r-- 1 root root 0 2015-10-20 17:28 229214750-podcastscience-233-la-these-de-micmaths.mp3
After redownloading it through greg, i got :
-rw-r--r-- 1 root root 92M 2016-09-18 09:58 229214750-podcastscience-233-la-these-de-micmaths.mp3_
-rw-r--r-- 1 root root 176 2016-09-18 09:58 229214750-podcastscience-233-la-these-de-micmaths.mp3
The 176 bytes are just the ID3 tags written by greg in the first "0 size" file. It is the newly downloaded file (with the _ suffix) that should have received the new tags.
I'm assuming that "sync" is supposed to download new entries, and that manual downloading isn't necessary (but the readme isn't clear to me).
I want to grab an audio podcast that publishes episodes and then all the components of those episodes as separate entries (unfortunately). But fortunately, the titles of the latter always include "Episode". So I've been able to filter on that.
But doing a greg sync tnyrh
doesn't do anything, even though there is new material shown by greg list
, and greg download 0-9
does grab new stuff named "Episode".
What am I doing wrong, or is there a bug maybe between sync and filter?
Installing as a user is not possible at the moment because /etc/greg.conf is required and the setup.py tries to install it at this fixed place. Please consider a plain user install (pip install --user ...)
I have been trying to download episodes from the "Hello Internet" podcast, but greg fails with an error message:
$ greg add HelloInternet http://www.hellointernet.fm/podcast?format=rss
$ greg sync HelloInternet
Checking HelloInternet...
Traceback (most recent call last):
File "/usr/bin/greg", line 9, in <module>
load_entry_point('Greg==0.4.4.3', 'console_scripts', 'greg')()
File "/usr/lib/python3/dist-packages/greg/gregparser.py", line 112, in main
args.func(vars(args))
File "/usr/lib/python3/dist-packages/greg/greg.py", line 746, in sync
feed.download_entry(entry)
File "/usr/lib/python3/dist-packages/greg/greg.py", line 286, in download_entry
for mimetype in self.mime]):
File "/usr/lib/python3/dist-packages/greg/greg.py", line 286, in <listcomp>
for mimetype in self.mime]):
File "/usr/lib/python3/dist-packages/feedparser.py", line 383, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'type'
Other podcasts work fine. I'm running Debian Jessie with stock packages (python 3.4.2 and python3-feedparser 5.1.3).
Hi,
So, the latest entries in these feeds appear to be defective:
http://podcast.c-span.org/xml/radio_feed.xml
https://thisishell.com/broadcast.xml
http://www.bbc.co.uk/programmes/p02nrsmh/episodes/downloads.rss
When greg encounters them it outputs this error and exits:
... something went wrong. Are you connected to the internet?
As a result, greg is effectively broken when it is run as a cron job and 'greg sync' is limited. It would be extremely helpdul if there was an argument which would force greg to move on to the next feed even when an entry is defective or to ignore a given feed during 'greg sync'.
Hi,
I activated tagging in the config file (DEFAULT section, Tag = yes) but after downloading a podcast called "test", I get the following stacktrace :
[edouard@pioneer ~]$ greg sync
Checking test...
Downloading L'intégrale des Grosses têtes du 18 novembre -- 7780557844_l-integrale-des-grosses-tetes-du-18-novembre.mp3
Traceback (most recent call last):
File "/usr/local/bin/greg", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/greg/gregparser.py", line 112, in main
args.func(vars(args))
File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 760, in sync
feed.download_entry(entry)
File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 330, in download_entry
tag(placeholders)
File "/usr/local/lib/python3.5/site-packages/greg/greg.py", line 506, in tag
feedoptions = placeholders.feed.config.options(placeholders.name)
File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/configparser.py", line 675, in options
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'test'
I was hoping that my default tagging options would be used for every podcast without having to add a specific section, should that be the case ?
I am attempting to download a file using a custom name of the format: YYYYMMDD-filename.mp3
Here are the relevant settings:
date_format = %Y%m%d
file_to_tag = {date}-{filename_title}.mp3
downloadhandler = wget {link} -O {directory}/{date}-{filename_title}.mp3
When I run this, I receive the following error:
Traceback (most recent call last):
File "/usr/bin/greg", line 11, in
load_entry_point('Greg==0.4.7', 'console_scripts', 'greg')()
File "/usr/lib/python3.5/site-packages/greg/parser.py", line 138, in main
function(vars(args))
File "/usr/lib/python3.5/site-packages/greg/commands.py", line 176, in sync
downloaded = feed.download_entry(entry)
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 325, in download_entry
placeholders = aux.check_directory(placeholders)
File "/usr/lib/python3.5/site-packages/greg/aux_functions.py", line 142, in check_directory
subdnametemplate, placeholders)
File "/usr/lib/python3.5/site-packages/greg/aux_functions.py", line 284, in substitute_placeholders
date=placeholders.date_string(),
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 373, in date_string
date_format = self.feed.retrieve_config("date_format", "%Y-%m-%d")
File "/usr/lib/python3.5/site-packages/greg/classes.py", line 135, in retrieve_config
answer = self.config.get(section, value, fallback=default)
File "/usr/lib/python3.5/configparser.py", line 797, in get
d)
File "/usr/lib/python3.5/configparser.py", line 393, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/usr/lib/python3.5/configparser.py", line 443, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%Y%m%d'
When downloading, we currently download every available issue in no particular order. That's wrong: if the connection is lost while we are doing this, we will leave a later date in the data
file, and this will instruct greg not to subsequently download the earlier issues.
Greg should download issues from earlier to later.
Hi Manolo
sorry to make an "issue" out of this, but could you provide a basic how-to install greg?
I'm hoping to install on a debian server, just need a few pointers...
thanks!
Lee
I've got a simple greg sync
running as a cron job (via fcron under Arch Linux). It works fine when I run it in the terminal, but when running as a cron job I get the following output:
Traceback (most recent call last):
File "/usr/bin/greg", line 9, in
load_entry_point('Greg==0.4.6', 'console_scripts', 'greg')()
File "/usr/lib/python3.5/site-packages/greg/gregparser.py", line 118, in main
function(vars(args))
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 745, in sync
session = Session(args)
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 55, in init
self.data_dir = self.retrieve_data_directory()
File "/usr/lib/python3.5/site-packages/greg/greg.py", line 95, in retrieve_data_directory
config.read([config_filename_global, self.config_filename_user])
File "/usr/lib/python3.5/configparser.py", line 696, in read
self._read(fp, filename)
File "/usr/lib/python3.5/configparser.py", line 1012, in _read
for lineno, line in enumerate(fp, start=1):
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)
I've had the BBC 6-o-clock-news feed working for quite some time, but on December 2, greg stopped downloading new episodes. URL: http://www.bbc.co.uk/programmes/b006qjxt/episodes/downloads.rss
"greg check" sees new episodes, and "download" will fetch them, but the "sync date" remains stuck at 12/02. The only thing that I notice about the 12/02 entry is that it contains double quotes in the episode description; perhaps that trips up the parsing?
[jdb@alarmpi ~]$ greg add TEDTalks http://feeds.feedburner.com/TEDTalks_audio
Traceback (most recent call last):
File "/home/jdb/.local/bin/greg", line 11, in <module>
sys.exit(main())
File "/home/jdb/.local/lib/python3.5/site-packages/greg/parser.py", line 138, in main
function(vars(args))
File "/home/jdb/.local/lib/python3.5/site-packages/greg/commands.py", line 39, in add
session = c.Session(args)
File "/home/jdb/.local/lib/python3.5/site-packages/greg/classes.py", line 45, in __init__
self.data_dir = self.retrieve_data_directory()
File "/home/jdb/.local/lib/python3.5/site-packages/greg/classes.py", line 85, in retrieve_data_directory
config.read([config_filename_global, self.config_filename_user])
File "/usr/lib/python3.5/configparser.py", line 696, in read
self._read(fp, filename)
File "/usr/lib/python3.5/configparser.py", line 1012, in _read
for lineno, line in enumerate(fp, start=1):
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)
[jdb@alarmpi ~]$
I may be wrong, but i really don't see/understand how to rename downloaded files with greg ?
I would need that feature for some podcasts and not all of them.
Indeed, i have some podcasts where i want to keep the (clean) original filename, but i have a very few ones with quite messy non-standardized filenames. For them i would wish to rename them let's say with just the date.
So how to configure the podcast sections in greg.conf to define the mask of the downloaded files for a given podcast ?
~$ greg
Traceback (most recent call last):
File "/home/mjf/.local/bin/greg", line 9, in <module>
load_entry_point('Greg==0.4.5', 'console_scripts', 'greg')()
File "/home/mjf/.local/lib/python3.4/site-packages/greg/gregparser.py", line 113, in main
args.func(vars(args))
AttributeError: 'Namespace' object has no attribute 'func'
With greg on Ubuntu 14.04 when I run an edit the data is not saved, for example running:
greg edit 'Name of Podcast' -d 2015-05-15
Instead of saving data into the file ~/.local/share/greg/data/Name of Podcast
it just wipes the file and leaves it empty.
Any idea why this is happening?
greg sync tnyrh
Checking tnyrh...
Downloading Episode 13: El Chapo v. Flores Brothers, and Jack Handey’s Santa Fe -- tnyradiohour011516_cms566193_pod.mp3
Traceback (most recent call last):
File "/home/mjf/.local/bin/greg", line 9, in <module>
load_entry_point('Greg==0.4.5', 'console_scripts', 'greg')()
File "/home/mjf/.local/lib/python3.4/site-packages/greg/gregparser.py", line 113, in main
args.func(vars(args))
File "/home/mjf/.local/lib/python3.4/site-packages/greg/greg.py", line 764, in sync
downloaded = feed.download_entry(entry)
File "/home/mjf/.local/lib/python3.4/site-packages/greg/greg.py", line 325, in download_entry
condition = filtercond(placeholders)
File "/home/mjf/.local/lib/python3.4/site-packages/greg/greg.py", line 529, in filtercond
return eval(condition)
File "<string>", line 1
"Episode" in "Episode 12: Sarah Koenig on "Serial," and a Resilient Poet"
^
SyntaxError: invalid syntax
Seems like quote character needs to escaped?
I'm new to greg and my apologies if I'm missing something in the documentation or the configuration file, but does greg have the ability to keep a number of podcasts and clean up previous downloads? For example if I wanted to always have on hand the last 5 days of a subscribed show, I assume I would run 'greg download [0-4|-d YYYY-MM-DD]' via cron or something but would previous downloads be cleaned up or would I have to have another script or something do that for me?
I am planning on downloading the podcasts to a shared location that I'd like to expose to my home theater media manager and don't always listen everyday but it would be nice to have the last few days available.
I appreciate the work on this, it looks pretty awesome!
Since this format is largely used to exchange lists of feeds, a command line option in greg would be useful to migrate from/to it.
Hi,
Some times I really just want to listen to the newest podcast without too much fuzz. For instance it would be great just to be able to say greg play PhilosophyBites latest
or greg play PhilosophyBites 0
or perhaps I want to play the episode 8 conditional on the list of episodes (greg check
).
This would give Greg more a feel of an on-demand radio, which I at least often need.
Customization could be player program (defaulting to mplayer of ffplay or something else) and temporary download directory (probably /tmp).
I have a new install of greg and am seeing the following messages when trying to do a download:
mal@stn6714:~$ greg download 1
Traceback (most recent call last):
File "/home/mal/.local/bin/greg", line 9, in <module>
load_entry_point('Greg==0.4.6', 'console_scripts', 'greg')()
File "/home/mal/.local/lib/python3.2/site-packages/greg/gregparser.py", line 118, in main
function(vars(args))
File "/home/mal/.local/lib/python3.2/site-packages/greg/greg.py", line 825, in download
issues = parse_for_download(args)
File "/home/mal/.local/lib/python3.2/site-packages/greg/greg.py", line 497, in parse_for_download
for group in single_arg.split(sep=","):
TypeError: split() takes no keyword arguments
The system is running on is Debian 7.11
Python is 3.2.3
Do you have any tips on what I might look at to identify and correct the issue?
Mal.
I have a password protected feed that I can't seem to get to work. I've tried putting user = xxxx
and password = yyyy
in greg.conf
and also passing the username and password into the url, i.e. https://user:[email protected]/
(there is a trailing slash in feed url). Neither approach has worked so far. Is there a simple approach that I've missed? I can provide more specific information if needed.
Sorry for posting so many issues, 😄
I just added this podcast URL: http://www.hellointernet.fm/podcast?format=rss
On greg sync
I see the following error:
Checking Hello Internet...
Traceback (most recent call last):
File "/usr/local/bin/greg", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.4/dist-packages/greg/gregparser.py", line 112, in main
args.func(vars(args))
File "/usr/local/lib/python3.4/dist-packages/greg/greg.py", line 793, in sync
download_entry(feed, entry)
File "/usr/local/lib/python3.4/dist-packages/greg/greg.py", line 557, in download_entry
if any([mimetype in enclosure["type"] for mimetype in feed.mime]):
File "/usr/local/lib/python3.4/dist-packages/greg/greg.py", line 557, in <listcomp>
if any([mimetype in enclosure["type"] for mimetype in feed.mime]):
File "/usr/local/lib/python3.4/dist-packages/feedparser.py", line 357, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'type'
I think maybe is the question mark in the podcast url causing an issue? Or maybe it's a malformed feed... I'll check it inside a feed validator.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.