From 98954896e08bc6625c013b207163dcc931afc069 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 25 Sep 2010 12:53:36 -0600 Subject: [PATCH] Jerusalem Post in French by Tony Stegall --- resources/images/news/jpost_fr.png | Bin 0 -> 334 bytes resources/recipes/jpost_fr.recipe | 57 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 resources/images/news/jpost_fr.png create mode 100644 resources/recipes/jpost_fr.recipe diff --git a/resources/images/news/jpost_fr.png b/resources/images/news/jpost_fr.png new file mode 100644 index 0000000000000000000000000000000000000000..f68746e2e4ed5c7b053f78e28fd14986e6153d4e GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GGLLkg|>2BR0kYHJX zV>(DB7{?r2dl<;*^mK6y(Kw%M(h+mEfu+x{D8+&G`%%}4JAHUmm~Le!I6j*bFV?iu z>GykkHnz6aXMAqtCZvEsi}8b)4zojkzyANXcQHO%ci>gkj++A27jhl8iQn`TxLV-9 z*+77)VCf69KmY&BUuK-aue7VjqJeS0gp)04lO#PHjEtgZemHlOzh^CVLShL4BM z_;2vO+y!)$YKdz^NlIc#s#S7PDv)9@GB7mIHL%n*G7T{_vNAQaGBDLOFtai+I5D~Z n35tf?{FKbJN)!zyRzRhOMi33nYZKQ2H86O(`njxgN@xNAb#!lS literal 0 HcmV?d00001 diff --git a/resources/recipes/jpost_fr.recipe b/resources/recipes/jpost_fr.recipe new file mode 100644 index 0000000000..c4af992c43 --- /dev/null +++ b/resources/recipes/jpost_fr.recipe @@ -0,0 +1,57 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class JerusalemPost(BasicNewsRecipe): + title = 'Jerusalem post' + language = 'fr' + __author__ = 'TonytheBookworm' + description = 'The Jerusalem Post (in French)' + publisher = 'jpost' + category = 'news' + oldest_article = 30 + max_articles_per_feed = 100 + linearize_tables = True + no_stylesheets = True + remove_javascript = True + + masthead_url = 'http://static.jpost.com/JPSITES/images/JFrench/2008/site/jplogo.JFrench.gif' + + remove_tags = [ + dict(name='a', attrs={'href':['javascript:window.print()']}), + dict(name='div', attrs={'class':['bot']}), + + ] + + feeds = [ + ('NEWS', 'http://fr.jpost.com/servlet/Satellite?collId=1216805762036&pagename=JFrench%2FPage%2FRSS'), + ('JFrench En route vers la paix', 'http://fr.jpost.com/servlet/Satellite?collId=1216805762201&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Politique', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737334&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Securite', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737338&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Moyen Orient', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737342&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Diplomatie / Monde', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737346&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Economie / Sciences', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737358&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Societe', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737354&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Opinions', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737350&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Monde juif', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737366&pagename=JFrench%2FPage%2FRSS'), + ('JFrench Culture / Sport', 'http://fr.jpost.com/servlet/Satellite?collId=1215356737362&pagename=JFrench%2FPage%2FRSS') + ] + def print_version(self, url): + split1 = url.split("cid=") + #for testing only ------- + #print 'SPLIT IS: ', split1 + #print 'ORG URL IS: ', url + #--------------------------- + idnum = split1[1] # get the actual value of the id article + #for testing only -------------------- + #print 'the idnum is: ', idnum + #-------------------------------------- + print_url = 'http://fr.jpost.com/servlet/Satellite?cid=' + idnum + '&pagename=JFrench%2FJPArticle%2FPrinter' + #for testing only ------------------------- + #print 'PRINT URL IS: ', print_url + #------------------------------------------ + return print_url + + #example of how links should be formated + #-------------------------------------------------------------------------------------------------------------- + #org version = http://fr.jpost.com/servlet/Satellite?pagename=JFrench/JPArticle/ShowFull&cid=1282804806075 + #print version = http://fr.jpost.com/servlet/Satellite?cid=1282804806075&pagename=JFrench%2FJPArticle%2FPrinter + #------------------------------------------------------------------------------------------------------------------