Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2010, 09:04 AM   #1
sdow1
Connoisseur
sdow1 began at the beginning.
 
Posts: 55
Karma: 10
Join Date: Apr 2010
Location: new york city
Device: nook, ipad
Updated Feeds for Salon

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.
sdow1 is offline   Reply With Quote
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
Advert
Old 11-28-2011, 11:26 PM   #3
Krittika Goyal
Vox calibre
Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.
 
Krittika Goyal's Avatar
 
Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
@moolash: The rolling stones magazine free content recipe is working. are you using the other one?
Krittika Goyal is offline   Reply With Quote
Old 11-28-2011, 11:55 PM   #4
Krittika Goyal
Vox calibre
Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.
 
Krittika Goyal's Avatar
 
Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
rolling stones

here is the fixed version of the other rolling stones recipe

Code:
#!/usr/bin/env  python
__license__     = 'GPL v3'
__author__      = 'Tony Stegall'
__copyright__   = '2010, Tony Stegall or Tonythebookworm on mobileread.com'
__version__     = 'v1.01'
__date__        = '07, October 2010'
__description__ = 'Rolling Stones Mag'

'''
http://www.rollingstone.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class RollingStones(BasicNewsRecipe):
    __author__    = 'Tony Stegall'
    description   = 'Rolling Stones Mag'
    cover_url     = 'http://gallery.celebritypro.com/data/media/648/kid-rock-rolling-stone-cover.jpg'
    masthead_url  = 'http://origin.myfonts.com/s/ec/cc-200804/Rolling_Stone-logo.gif'


    title          = 'Rolling Stones Mag'
    category       = 'Music Reviews, Movie Reviews, entertainment news'

    language       = 'en'
    timefmt        = '[%a, %d %b, %Y]'

    oldest_article        = 15
    max_articles_per_feed = 25
    use_embedded_content  = False
    no_stylesheets = True
    auto_cleanup = True



    feeds          = [
                       (u'News', u'http://www.rollingstone.com/siteServices/rss/allNews'),
                       (u'Blogs', u'http://www.rollingstone.com/siteServices/rss/allBlogs'),
                       (u'Movie Reviews', u'http://www.rollingstone.com/siteServices/rss/movieReviews'),
                       (u'Album Reviews', u'http://www.rollingstone.com/siteServices/rss/albumReviews'),
                       (u'Song Reviews', u'http://www.rollingstone.com/siteServices/rss/songReviews'),


                     ]
Krittika Goyal is offline   Reply With Quote
Old 11-29-2011, 04:39 AM   #5
Krittika Goyal
Vox calibre
Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.
 
Krittika Goyal's Avatar
 
Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
oops

oops sorry the previous recipe does not display later pages of multi page articles. So here goes:

Code:
#!/usr/bin/env  python
__license__     = 'GPL v3'
__author__      = 'Tony Stegall'
__copyright__   = '2010, Tony Stegall or Tonythebookworm on mobileread.com'
__version__     = 'v1.01'
__date__        = '07, October 2010'
__description__ = 'Rolling Stones Mag'

'''
http://www.rollingstone.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class RollingStones(BasicNewsRecipe):
    __author__    = 'Tony Stegall'
    description   = 'Rolling Stones Mag'
    cover_url     = 'http://gallery.celebritypro.com/data/media/648/kid-rock-rolling-stone-cover.jpg'
    masthead_url  = 'http://origin.myfonts.com/s/ec/cc-200804/Rolling_Stone-logo.gif'


    title          = 'Rolling Stones Mag'
    category       = 'Music Reviews, Movie Reviews, entertainment news'

    language       = 'en'
    timefmt        = '[%a, %d %b, %Y]'

    oldest_article        = 15
    max_articles_per_feed = 25
    use_embedded_content  = False
    no_stylesheets = True
    auto_cleanup = True



    feeds          = [
                       (u'News', u'http://www.rollingstone.com/siteServices/rss/allNews'),
                       (u'Blogs', u'http://www.rollingstone.com/siteServices/rss/allBlogs'),
                       (u'Movie Reviews', u'http://www.rollingstone.com/siteServices/rss/movieReviews'),
                       (u'Album Reviews', u'http://www.rollingstone.com/siteServices/rss/albumReviews'),
                       (u'Song Reviews', u'http://www.rollingstone.com/siteServices/rss/songReviews'),


                     ]



    def print_version(self, url):
	  return url +'?print=true'
Krittika Goyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chit-Chat Le Salon du Livre 2010 zelda_pinwheel Forum Français 42 04-04-2010 02:08 PM
updated metadata=updated file? jomaweb Calibre 13 01-28-2010 08:12 PM
Salon du Livre à Paris zelda_pinwheel Lounge français 24 03-18-2009 05:06 PM
Salon Opened for Kindles in Maryland Bob Russell News 3 12-21-2008 05:44 PM


All times are GMT -4. The time now is 02:01 AM.


MobileRead.com is a privately owned, operated and funded community.