Manual de Calibre | Page 34

Manual de usuario de calibre, Publicación 2.73.0 __license__ = 'GNU General Public License v3 - http://www.gnu.org/copyleft/gpl.html' __copyright__ = 'mattst - [email protected]' ''' BBC News, Sport, and Blog Calibre Recipe ''' # Import the regular expressions module. import re # Import the BasicNewsRecipe class which this class extends. from calibre.web.feeds.recipes import BasicNewsRecipe class BBCNewsSportBlog(BasicNewsRecipe): # # **** IMPORTANT USERS READ ME **** # # First select the feeds you want then scroll down below the feeds list # and select the values you want for the other user preferences, like # oldest_article and such like. # # # Select the BBC rss feeds which you want in your ebook. # Selected feed have NO '#' at their start, de-selected feeds begin with a '#'. # # Eg. ("News Home", "http://feeds.bbci.co.uk/... - include feed. # Eg. #("News Home", "http://feeds.bbci.co.uk/... - do not include feed. # # There are 68 feeds below which constitute the bulk of the available rss # feeds on the BBC web site. These include 5 blogs by editors and # correspondants, 16 sports feeds, 15 'sub' regional feeds (Eg. North West # Wales, Scotland Business), and 7 Welsh language feeds. # # Some of the feeds are low volume (Eg. blogs), or very low volume (Eg. Click) # so if "oldest_article = 1.5" (only articles published in the last 36 hours) # you may get some 'empty feeds' which will not then be included in the ebook. # # The 15 feeds currently selected below are simply my default ones. # # Note: With all 68 feeds selected, oldest_article set to 2, # max_articles_per_feed set to 100, and simultaneous_downloads set to 10, # the ebook creation took 29 minutes on my speedy 100 mbps net connection, # fairly high-end desktop PC running Linux (Ubuntu Lucid-Lynx). # More realistically with 15 feeds selected, oldest_article set to 1.5, # max_articles_per_feed set to 100, and simultaneous_downloads set to 20, # it took 6 minutes. If that's too slow increase 'simultaneous_downloads'. # # Select / de-select the feeds you want in your ebook. # feeds = [ ("News Home", "http://feeds.bbci.co.uk/news/rss.xml"), ("UK", "http://feeds.bbci.co.uk/news/uk/rss.xml"), ("World", "http://feeds.bbci.co.uk/news/world/rss.xml"), # ("England", "http://feeds.bbci.co.uk/news/england/rss.xml"), 30 CapĆ­tulo 1. Secciones