This commit is contained in:
Kovid Goyal 2017-01-27 09:15:36 +05:30
parent 48f1635512
commit 57229e839d
2 changed files with 6 additions and 4 deletions

View File

@ -264,7 +264,9 @@ class AppleDaily(BasicNewsRecipe):
not self.has_single_feed, not self.has_single_feed,
a.orig_url, __appname__, prefix=prefix, a.orig_url, __appname__, prefix=prefix,
center=self.center_navbar) center=self.center_navbar)
translatedTempl =re.sub('<hr.*<br','<hr>本篇由 '+__appname__+' 快取自 <a href="http://hkm.appledaily.com/" >蘋果日報</a> ; <a href="'+a.orig_url+'">本篇來源位置</a>。'+ translatedTempl =re.sub(
'<hr.*<br','<hr>本篇由 '+__appname__+
' 快取自 <a href="http://hkm.appledaily.com/" >蘋果日報</a> ; <a href="'+a.orig_url+'">本篇來源位置</a>。'+
'<br',templ.render(doctype='xhtml').decode('utf-8'),flags=re.S) '<br',templ.render(doctype='xhtml').decode('utf-8'),flags=re.S)
elem = BeautifulSoup(translatedTempl).find('div') elem = BeautifulSoup(translatedTempl).find('div')
body.insert(len(body.contents), elem) body.insert(len(body.contents), elem)