View Single Post
Old 02-24-2013, 10:26 PM   #3
davidnye
Member
davidnye began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Aug 2011
Device: Nook
Here's a recipe for Democracy Journal:

Code:
class AdvancedUserRecipe1361743898(BasicNewsRecipe):
    title = u'Democracy Journal'
    description = '''A journal of ideas. Published quarterly.'''
    __author__ = u'David Nye'
    oldest_article = 90
    max_articles_per_feed = 30
    no_stylesheets = True
    auto_cleanup = True
    
    def parse_index(self):
        articles = []
        feeds = []
        soup = self.index_to_soup("http://www.democracyjournal.org")
        for x in soup.findAll(href=re.compile("http://www\.democracyjournal\.org/\d*/.*php$")):
            url = x.get('href')
            title = self.tag_to_string(x)
            articles.append({'title':title, 'url':url, 'description':'', 'date':''})
        feeds.append(('Articles', articles))
        return feeds
        
    def print_version(self, url):
        return url + '?page=all'
davidnye is offline   Reply With Quote