This commit is contained in:
Kovid Goyal 2017-06-20 18:00:14 +05:30
parent 65f7c7e794
commit f427882d67
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 3 deletions

View File

@ -40,7 +40,9 @@ class FinancialTimes(BasicNewsRecipe):
PREFIX = 'http://www.ft.com' PREFIX = 'http://www.ft.com'
keep_only_tags = [ keep_only_tags = [
classes('article__header--wrapper article__time-byline article__body n-content-image barrier-grid__heading article__time-byline topper__headline topper__standfirst') classes(
'article__header--wrapper article__time-byline article__body'
'n-content-image barrier-grid__heading article__time-byline topper__headline topper__standfirst')
] ]
remove_tags = [ remove_tags = [

View File

@ -47,7 +47,8 @@ class TimesOnline(BasicNewsRecipe):
def get_cover_url(self): def get_cover_url(self):
from datetime import date from datetime import date
cover = 'http://img.kiosko.net/' + str(date.today().year) + '/' + date.today().strftime('%m') + '/' + date.today().strftime('%d') + '/uk/the_times.750.jpg' cover = 'http://img.kiosko.net/' + str(
date.today().year) + '/' + date.today().strftime('%m') + '/' + date.today().strftime('%d') + '/uk/the_times.750.jpg'
br = BasicNewsRecipe.get_browser(self) br = BasicNewsRecipe.get_browser(self)
try: try:
br.open(cover) br.open(cover)
@ -60,7 +61,7 @@ class TimesOnline(BasicNewsRecipe):
self.log("\nCover unavailable") self.log("\nCover unavailable")
cover = None cover = None
return cover return cover
def get_browser(self): def get_browser(self):
br = BasicNewsRecipe.get_browser(self) br = BasicNewsRecipe.get_browser(self)
br.open('http://www.thetimes.co.uk/') br.open('http://www.thetimes.co.uk/')