From df5e7a6549a06c0ba0d6c35c6a324d0cb66d735f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 Mar 2009 14:28:23 -0800 Subject: [PATCH] New recipe for Miami Herald by Darko Miletic --- src/calibre/gui2/images/news/miami_herald.png | Bin 0 -> 1016 bytes src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/recipe_miami_herald.py | 53 ++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/calibre/gui2/images/news/miami_herald.png create mode 100644 src/calibre/web/feeds/recipes/recipe_miami_herald.py diff --git a/src/calibre/gui2/images/news/miami_herald.png b/src/calibre/gui2/images/news/miami_herald.png new file mode 100644 index 0000000000000000000000000000000000000000..6b4984b0fdbe29b8a319d3e12e9e39d538af0895 GIT binary patch literal 1016 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87?>43T^vI!PUlXJ&k0VII97k(GTy)X*1ET+ zE^RbjGrOsz^TDH5mtBnl9X>LOvplXy&rMW|6VT`BIpWeeOQX|Gc#8Dm3daJ&HtEN` zY+eB|919vP)26nZ)m`)Y)>_%W)#rZpiJwXRSE)bWX1{v=yeEQxez)m+w0Jz+_4mN7 zRMYkc)g`uPZ}0tjwd^DR5072!zP|;QZew1Mz2Hu@o^#XFm}3{>AD_K)biZJ&=$^+3 zUuXmZ#e%UtID3 z%)FE>m0!XpZqWSb#e2Kdk;A9ouco*EpzK?X>tByD&pXdI_ut!#Qyc!3PBf46a*5h6 zH~aZf`Q<)cK*0=CnZ5Sqg&#}wnK|KZDuXdekQJK_jAUdFXt|`Eq@=fWA6G*)yY%# z@^5D-*#2ySSBvEi<9(Mt=PdNQu=?@$S1o_7W?yH!=AE@IT`4+oUryjwk>~qj5_Z@- zZuT$y_DUsvUCN19N#@)Q&xHR$ep6!ZgraKz4Vra-t&?=3)X14^Ot7Sy=%V5estm9{tph(Esa;ym}WVD`zE43 z@4jz#@q~;UDVqCF95>&Tuyg&Vu=iJ|>VDa4Q?tWbswUrPf5&5|^R==*&$~@zTJ;4U zeeXIuZ5@lUarw!}iI4aEzcTTEPv-4^>1`%QcE8wk(@9||i*Hh z^7Zlm^}Pqask2$dE@f+7_Euz;ocJ!67e#)?HJP`i|JeLJ+Sz&a-+qRr|BN3g`R-={ z<{Z@$*NBqjqSVBaRNWLH!C+)yV5w_htZQHvVq|1xWNKwzopr09EwV`v3p{ literal 0 HcmV?d00001 diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 2817ec8c02..6eb24e162b 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -7,7 +7,7 @@ Builtin recipes. recipe_modules = ['recipe_' + r for r in ( 'newsweek', 'atlantic', 'economist', 'portfolio', 'nytimes', 'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj', - 'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', + 'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', 'miami_herald', 'ars_technica', 'upi', 'new_yorker', 'irish_times', 'iht', 'lanacion', 'discover_magazine', 'scientific_american', 'new_york_review_of_books', 'daily_telegraph', 'guardian', 'el_pais', 'new_scientist', 'b92', diff --git a/src/calibre/web/feeds/recipes/recipe_miami_herald.py b/src/calibre/web/feeds/recipes/recipe_miami_herald.py new file mode 100644 index 0000000000..c97e556428 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_miami_herald.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +miamiherald.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class TheMiamiHerald(BasicNewsRecipe): + title = 'The Miami Herald' + __author__ = 'Darko Miletic' + description = "Miami-Dade and Broward's source for the latest breaking local news on sports, weather, business, jobs, real estate, shopping, health, travel, entertainment, & more." + oldest_article = 1 + max_articles_per_feed = 100 + publisher = u'The Miami Herald' + category = u'miami herald, weather, dolphins, news, miami news, local news, miamiherald, miami newspaper, miamiherald.com, miami, the miami herald, broward, miami-dade' + language = _('English') + no_stylesheets = True + use_embedded_content = False + encoding = 'cp1252' + remove_javascript = True + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' + + html2lrf_options = [ + '--comment' , description + , '--category' , category + , '--publisher' , publisher + ] + + + keep_only_tags = [dict(name='div', attrs={'id':'pageContainer'})] + + feeds = [ + (u'Breaking News' , u'http://www.miamiherald.com/416/index.xml' ) + ,(u'Miami-Dade' , u'http://www.miamiherald.com/460/index.xml' ) + ,(u'Broward' , u'http://www.miamiherald.com/467/index.xml' ) + ,(u'Florida Keys' , u'http://www.miamiherald.com/505/index.xml' ) + ,(u'Florida' , u'http://www.miamiherald.com/569/index.xml' ) + ,(u'Nation' , u'http://www.miamiherald.com/509/index.xml' ) + ,(u'World' , u'http://www.miamiherald.com/578/index.xml' ) + ,(u'Americas' , u'http://www.miamiherald.com/579/index.xml' ) + ,(u'Cuba' , u'http://www.miamiherald.com/581/index.xml' ) + ,(u'Haiti' , u'http://www.miamiherald.com/582/index.xml' ) + ,(u'Politics' , u'http://www.miamiherald.com/515/index.xml' ) + ,(u'Education' , u'http://www.miamiherald.com/295/index.xml' ) + ,(u'Environment' , u'http://www.miamiherald.com/573/index.xml' ) + ] + + def print_version(self, url): + return url.replace('/story/','/v-print/story/') +