Nicer time fmt for WSJ

This commit is contained in:
Kovid Goyal 2018-01-06 23:10:20 +05:30
parent ed3ff3762d
commit eccc5e1834
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -260,7 +260,7 @@ class WSJ(BasicNewsRecipe):
root = self.index_to_soup(self.wsj_itp_page, as_tree=True) root = self.index_to_soup(self.wsj_itp_page, as_tree=True)
for span in CSSSelect('span.date-date')(root): for span in CSSSelect('span.date-date')(root):
if span.text and span.text.strip(): if span.text and span.text.strip():
self.timefmt = span.text self.timefmt = ' [%s]' % span.text.strip()
break break
for a in CSSSelect('div.itpSectionHeaderPdf a[href]')(root): for a in CSSSelect('div.itpSectionHeaderPdf a[href]')(root):
self.cover_url = a.get('href') self.cover_url = a.get('href')

View File

@ -197,7 +197,7 @@ class WSJ(BasicNewsRecipe):
root = self.index_to_soup(self.wsj_itp_page, as_tree=True) root = self.index_to_soup(self.wsj_itp_page, as_tree=True)
for span in CSSSelect('span.date-date')(root): for span in CSSSelect('span.date-date')(root):
if span.text and span.text.strip(): if span.text and span.text.strip():
self.timefmt = span.text self.timefmt = ' [%s]' % span.text.strip()
break break
for a in CSSSelect('div.itpSectionHeaderPdf a[href]')(root): for a in CSSSelect('div.itpSectionHeaderPdf a[href]')(root):
self.cover_url = a.get('href') self.cover_url = a.get('href')