Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't sync with SpyCast #35

Closed
n8willis opened this issue Nov 23, 2015 · 5 comments
Closed

Can't sync with SpyCast #35

n8willis opened this issue Nov 23, 2015 · 5 comments

Comments

@n8willis
Copy link

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?

@manolomartinez
Copy link
Owner

Hi, no, this feed appears to be mostly fine. There is just a typo in the date of the offending entry, which reads "Tue, 207Oct 2015 10:30:00 EST". Feedparser, and then greg, chokes on the Oct 207 thing :). If you avoid the entry titled 'Special Breed of Warrior: An Interview with Former SEAL Clinton Emerson', it should work fine.

Anyway, greg should probably be more resilient to this kind of problems. I'll think about how to do this. Thanks for reporting!

@ghost
Copy link

ghost commented Nov 24, 2015

Perhaps sanitize the date with something like dateutil then if you can't verify the date format, then get the date of the previous feed entry and increment that date by 1 day and use that as the date for the problematic feed entry. Perhaps notify the user of the change, demonstrate why the feed item date was change, and notify of the string which threw the error.

@manolomartinez
Copy link
Owner

Actually, feedparser takes care of the parsing for us, and it does an excellent job at that. But yeah, the second part of your suggestion looks sensible to me. I'll try to get to it later this week.

@ghost
Copy link

ghost commented Feb 12, 2016

Does 73152e1 address this?

@manolomartinez
Copy link
Owner

It does, for the time being. A more general solution would be preferable, though -- I'm working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants