now a requests.Response is returned instead of the file-like object from urllib.
Fixed all usages of util.urlopen: it simplifies getting json, text encoding detection.
In particular feedcore (responsible for fetching feeds) is simplified.
This is a first pass and could benefit from better usage of the requests api
(Sessions for instance, to keep connection pools)
TODO: download.py
https://bugs.gpodder.org/show_bug.cgi?id=2023 is very annoying, as podcast stopped updating quietly (as long as the offending entry is in the feed). It was also confusing as adding such a failed.
Example taken from http://www.br-online.de/podcast/kalenderblatt/cast.xml
<item>
<title>Kaufhaus Schocken in Stuttgart abgerissen - 02.05.1960</title>
<pubDate>Mon, 02 May 1960 09:05:01 +0100</pubDate>
<description>Das Auge kauft mit! Das gilt nicht nur für die Ware, sondern für das Shoppingerlebnis insgesamt. Das denkt sich Salman Schocken und baut seine Kaufhäuser zu architektonischen Meisterwerken aus. Autorin: Leo Hoffmann</description>
<link>http://cdn-storage.br.de/iLCpbHJGNL9zu6i6NL97bmWH_-by/_-ZS/9-k6528G/600502_0905_radioWissen_Kaufhaus-Schocken-in-Stuttgart-abgerissen.mp3</link>
<enclosure url="http://cdn-storage.br.de/iLCpbHJGNL9zu6i6NL97bmWH_-by/_-ZS/9-k6528G/600502_0905_radioWissen_Kaufhaus-Schocken-in-Stuttgart-abgerissen.mp3" length="3434832" type="audio/mpeg"/>
<guid isPermaLink="false">600502_0905_radioWissen_Kaufhaus-Schocken-in-Stuttgart-abgerissen.mp3</guid>
<itunes:author>Bayern 2</itunes:author>
<itunes:summary>Das Auge kauft mit! Das gilt nicht nur für die Ware, sondern für das Shoppingerlebnis insgesamt. Das denkt sich Salman Schocken und baut seine Kaufhäuser zu architektonischen Meisterwerken aus. Autorin: Leo Hoffmann</itunes:summary>
<itunes:keywords>Kaufhaus Schocken, Stuttgart, Salman Schocken, Einzelhandel, Shopping, Architektur, Erich Mendelsohn, Wissen, Geschichte, Das Kalenderblatt, radioWissen, Feuilleton, Podcast, Bayern 2, Bayerischer Rundfunk</itunes:keywords>
<itunes:duration>00:03:34</itunes:duration>
</item>
Thanks to Ilkka Laukkanen for the initial feature
request and for Kurt McKee and Stefan Kögl for the
implementation in feedparser (since 5.0).
This feature will only work with feedparser >= 5.0,
but will gracefully degrade (ignore RSS redirects)
with older versions of feedparser.
The following command has been used:
grep -r '2005-2009 Thomas Perl and the gPodder Team' * | cut -d: -f1 |
xargs sed -i -e 's/2005-2009 Thomas Perl and the gPodder Team/2005-2010
Thomas Perl and the gPodder Team/g'
Modify feedparser's default "Accept:" header to
also include a plain "*/*" content type, so that
the web server at EA.com will happily return the
RSS feed contents instead of an error.
Thanks to Romain Janvier for reporting this bug.
This might break a lot, but it makes feed parsing and
updating so much cleaner, and also helps with error
reporting, because exceptions are bubbled up to the UI.
Removed:
* Changing feed URL (this introduces too many problems)
* Support for FTP proxy servers (who uses FTP for podcasts?)