View Single Post
Old 02-12-2013, 07:37 AM   #2
JonathanL
Junior Member
JonathanL began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2013
Device: Kindle Keyboard
First efforts

Here is my first effort. The articles are pretty clean and auto cleanup works fine. I just wanted to include a line under the title with the date and author. It looks like it is contained in a div class "post-meta", but auto_cleanup_keep is not enough to pull in this data it seems.

Spoiler:

class Politikon(BasicNewsRecipe):
title = u'Politikon - Pol\xedtica, econom\xeda, sociedad y actualidad. (extended)'
oldest_article = 7
max_articles_per_feed = 20
auto_cleanup = True

feeds = [
(u'Politikon - Pol\xedtica, econom\xeda, sociedad y actualidad.', u'http://politikon.es/feed/'),
(u'Ahora','http://politikon.es/category/ahora/feed/'),
(u'Pol\xedtica', 'http://politikon.es/category/politica/feed/'),
(u'Econom\xeda' , 'http://politikon.es/category/economia/feed/'),
(u'Internacional', 'http://politikon.es/category/internacional/feed/'),
(u'Sociedad', 'http://politikon.es/category/sociedad/feed/')
]

no_stylesheets = True

auto_cleanup_keep = '//div[@class="post-meta"]|//abbr[@class="date time published"]|//span[@class="author vcard"]'

ignore_duplicate_articles = {'title', 'url'}


Thanks for any help
JonathanL is offline   Reply With Quote