From f535aa7722d3115b9557a610121fe2d32a333aaf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 19 Nov 2017 07:32:55 +0530 Subject: [PATCH] Fix #1727917 [China Daily recipe broken](https://bugs.launchpad.net/calibre/+bug/1727917) --- recipes/chinadaily.recipe | 18 +++++++++++------- recipes/icons/chinadaily.png | Bin 254 -> 631 bytes 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/recipes/chinadaily.recipe b/recipes/chinadaily.recipe index 9f75085a0d..e1704d6f09 100644 --- a/recipes/chinadaily.recipe +++ b/recipes/chinadaily.recipe @@ -1,5 +1,9 @@ +# -*- mode: python -*- +# -*- coding: utf-8 -*- +# vim:fileencoding=utf-8 + __license__ = 'GPL v3' -__copyright__ = '2010 - 2012, Darko Miletic ' +__copyright__ = '2010 - 2017, Darko Miletic ' ''' www.chinadaily.com.cn ''' @@ -21,7 +25,8 @@ class Pagina12(BasicNewsRecipe): language = 'en_CN' remove_empty_feeds = True publication_type = 'newsportal' - masthead_url = 'http://www.chinadaily.com.cn/15421.files/chinadailylogo_e_20100301.jpg' + auto_cleanup = True + masthead_url = 'http://www.chinadaily.com.cn/98103.files/logo.jpg' extra_css = """ body{font-family: Arial,Helvetica,sans-serif } .titlebox{font-family: "Times New Roman",Times,serif} @@ -29,13 +34,12 @@ class Pagina12(BasicNewsRecipe): """ conversion_options = { - 'comment': description, 'tags': category, 'publisher': publisher, 'language': language + 'comment': description, + 'tags': category, + 'publisher': publisher, + 'language': language } - remove_tags = [dict(name=['object', 'embed', 'iframe', 'table'])] - keep_only_tags = [ - dict(attrs={'class': ['titlebox', 'timebox', 'authorbox', 'cont-ins']})] - feeds = [ (u'China', u'http://www.chinadaily.com.cn/rss/china_rss.xml'), diff --git a/recipes/icons/chinadaily.png b/recipes/icons/chinadaily.png index 56478957ab8fefc2037056d91428bee207ea9e66..030944da827fc1968b41714c6523427897644707 100644 GIT binary patch delta 617 zcmV-v0+#*$0rv!u8Gi-<001BJ|6u?C010qNS#tmY4#WTe4#WYKD-Ig~000tnMObuS zabIa;Z%=Y*XGCRibZ7uGGS%X^>;M1)3rR#lR5*>*Qq4=#aTxzR&wekPxiJR4xmZRP ztWppr4GPweMKp_EL?rU$J&1@-U3Rduc=S*g50O|MOqz!pg?|nzsLe2ggw&ifgDsZs z?f3isz8%WB4*dasPR|1mpEn+0$Ah+pcs$NC)r04k*9-kWisjvYuY3B*jmU#n@6sd8 z1SXP-s;#>>*&%_u9s(* z*Q0PSASEJ(0&u*e^2NIA{N+#kc5y7@4R9#O~GC9}WGd%vWP^q;7 zfUY>Qx}szhrr_kAvllYyxlhatBK#ua1tCNy5rK%Z?H$2mY#7HkPMv5w=XGjn*b-IK z@)ygMZer6CnyRYuuQY61x`hy(QUb)7-{bRjhr{8b0szkj`@fut$GfO>=+auDbj86W zTlad$nVX9qkNY8*|GWoK(46}7K%iwR6bk**#SX@A=xEJ=vV=Sv00000NkvXXu0mjf DEDs+N delta 237 zcmV*U}6HkEJkW~n`9{&FOFG9oR7hjt8-G>+qBsuC207;