View Single Post
Old 11-28-2011, 02:54 PM   #2
moolash
Junior Member
moolash began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2011
Device: kindle
Quote:
Originally Posted by sdow1 View Post
I was wondering why so many of the feeds for salon seemed to be empty these days, and in taking a look, realized that many of the authors that had dedicated feeds have left the site (and new feeds have been created). In addition, many of the salon feeds are now run through feedburner, rather than salon directly, so the old feeds were pointing to nothing (or outdated info)

So I updated the Salon recipe with the new feeds:

Spoiler:
Code:
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement

__license__   = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'

from calibre.web.feeds.news import BasicNewsRecipe


class Salon_com(BasicNewsRecipe):
    title = 'Salon.com (custom)'
    __author__ = 'cix3'
    description = 'Salon.com - Breaking news, opinion, politics, entertainment, sports and culture.'
    timefmt = ' [%b %d, %Y]'
    language = 'en'

    oldest_article = 7
    max_articles_per_feed = 100

    remove_tags = [dict(name='div', attrs={'class':['ad_content', 'clearfix']}), dict(name='hr'), dict(name='img')]

    remove_tags_before = dict(name='h2')

    feeds = [
        ('News & Politics', 'http://feeds.salon.com/salon/news'),
        ('War Room', 'http://feeds.feedburner.com/salon/war_room'),
        ('Joan Walsh', 'http://feeds.feedburner.com/Salon_Joan_Walsh'),
        ('Glenn Greenwald', 'http://feeds.feedburner.com/salon/greenwald'),
        ('Tech & Business', 'http://feeds.salon.com/salon/tech'),
        ('Ask the Pilot', 'http://feeds.feedburner.com/salon/ask_the_pilot'),
        ('How World Works', 'http://feeds.feedburner.com/salon/htww'),
        ('Life', 'http://feeds.feedburner.com/salon/mwt'),
        ('Broadsheet', 'http://feeds.feedburner.com/salon/broadsheet'),
        ('Movie Reviews', 'http://feeds.feedburner.com/salon/movie_reviews'),
        ('Film Salon', 'http://feeds.feedburner.com/Salon/Film_Salon'),
        ('TV', 'http://feeds.feedburner.com/salon/tv'),
        ('Books', 'http://feeds.feedburner.com/salon/books')
            ]

    def print_version(self, url):
        return url.replace('/index.html', '/print.html')


Note: I know less than nothing about python scripting or anything of the sort, but it seemed simple enough to just swap out one list of rss feeds and titles for another.

I would also note that there are a few more feeds on topics I wasn't interested in (primarily food-related), so if someone wants those, they'll have to get them themselves.
Rolling Stone Magazine seems to be having the same problem. I download it to Calibre and then transfer to my Kindle but I do not get any content. Would you care to look into this? I am not well versed in technology so it is all too much for me. Thanks.....
moolash is offline   Reply With Quote