![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jan 2014
Device: Kindle
|
Two italian recipes
Hi!!
to say thank you for your support with my recipe (it's still broken ![]() 1. Attivissimo, debunker Code:
from calibre.web.feeds.news import BasicNewsRecipe class Disinformatico(BasicNewsRecipe): title = u'Il Disinformatico - Paolo Attivissimo' oldest_article = 7 max_articles_per_feed = 25 auto_cleanup = False use_embedded_content = False description = 'Un blog di Paolo Attivissimo, giornalista informatico e cacciatore di bufale' publisher = 'http://attivissimo.blogspot.it' language = 'it' __author__ = 'isspro' publication_type = 'blog' conversion_options = { 'title' : title, 'comments' : description, 'language' : language, 'publisher' : 'Paolo Attivissimo', 'authors' : 'Paolo Attivissimo', 'smarten_punctuation' : True } keep_only_tags = [ dict(name='div', attrs={'class':'post hentry'}) ] remove_tags = [ dict(name='span', attrs={'id':'NumCom'}), dict(name='div', attrs={'id':'PostFooter'}) ] extra_css = ''' h1 {font-size:x-large;} .post-body {margin: 0pt;} .post-timestamp {margin-right: 0pt;} ''' def parse_feeds(self): feeds = BasicNewsRecipe.parse_feeds(self) # Loop through all feeds. for feed in feeds: # Loop through all articles in feed. for article in feed.articles[:]: if 'podcast' in article.title: feed.articles.remove(article) return feeds feeds = [(u'Home', u'http://feeds.feedburner.com/Disinformatico')] Code:
import re from calibre.web.feeds.news import BasicNewsRecipe class WiredITA(BasicNewsRecipe): title = u'Wired.it' oldest_article = 1 max_articles_per_feed = 50 no_stylesheets = True use_embedded_content = False auto_cleanup = False encoding = 'utf8' masthead_url = 'http://www.wired.com/images/home/wired_logo.gif' description = 'Wired - Make in Italy. Inventa, sbaglia, innova' publisher = 'http://www.wired.it/' language = 'it' __author__ = 'isspro' publication_type = 'magazine' conversion_options = { 'title' : title, 'comments' : description, 'language' : language, 'publisher' : publisher, 'authors' : title, 'smarten_punctuation' : True } keep_only_tags = [ dict(name='div', attrs={'id':'main-article'}) ] remove_tags = [ dict(name='img', attrs={'class':'avatar img-circle'}), dict(name='div', attrs={'class':'topics'}), dict(name='div', attrs={'class':'social-share hidden-lg'}), dict(name='span', attrs={'class':'label'}) ] extra_css = ''' h1 {font-size:x-large;} p.lead {font-size:medium;} .who {line-height: 0pt; margin: 0pt;} ''' preprocess_regexps = [ (re.compile(r'Pubblicato'), lambda match: '') ] feeds = [(u'Attualit\xe0', u'http://www.wired.it/attualita/feed/'), (u'Internet','http://www.wired.it/internet/feed/'), (u'Gadget','http://www.wired.it/gadget/feed/'), (u'Mobile','http://www.wired.it/mobile/feed/'), (u'Scienza','http://www.wired.it/scienza/feed/'), (u'Economia','http://www.wired.it/economia/feed/'), (u'LifeStyle','http://www.wired.it/lifestyle/feed/'), (u'Play','http://www.wired.it/play/feed/'), ] best regards |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
3 new Italian recipes | faber1971 | Recipes | 0 | 04-17-2012 04:31 AM |
two new italian recipes | faber1971 | Recipes | 0 | 04-07-2012 06:47 AM |
eight new Italian recipes | faber1971 | Recipes | 0 | 01-28-2012 05:57 AM |
two italian recipes | faber1971 | Recipes | 0 | 01-09-2012 02:12 PM |
new Italian recipes | faber1971 | Recipes | 0 | 01-05-2012 07:44 AM |