mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #5708 (Updated recipe for Gizmodo)
This commit is contained in:
parent
b935eb5e46
commit
1fc5cd26c8
@ -17,7 +17,7 @@ class Gizmodo(BasicNewsRecipe):
|
|||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
use_embedded_content = True
|
use_embedded_content = False
|
||||||
language = 'en'
|
language = 'en'
|
||||||
masthead_url = 'http://cache.gawkerassets.com/assets/gizmodo.com/img/logo.png'
|
masthead_url = 'http://cache.gawkerassets.com/assets/gizmodo.com/img/logo.png'
|
||||||
extra_css = ' body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif} img{margin-bottom: 1em} '
|
extra_css = ' body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif} img{margin-bottom: 1em} '
|
||||||
@ -30,8 +30,10 @@ class Gizmodo(BasicNewsRecipe):
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove_attributes = ['width','height']
|
remove_attributes = ['width','height']
|
||||||
remove_tags = [dict(name='div',attrs={'class':'feedflare'})]
|
keep_only_tags = [dict(attrs={'class':'content permalink'})]
|
||||||
remove_tags_after = dict(name='div',attrs={'class':'feedflare'})
|
remove_tags_before = dict(name='h1')
|
||||||
|
remove_tags = [dict(attrs={'class':'contactinfo'})]
|
||||||
|
remove_tags_after = dict(attrs={'class':'contactinfo'})
|
||||||
|
|
||||||
feeds = [(u'Articles', u'http://feeds.gawker.com/gizmodo/full')]
|
feeds = [(u'Articles', u'http://feeds.gawker.com/gizmodo/full')]
|
||||||
|
|
||||||
|
@ -53,13 +53,17 @@ class Article(object):
|
|||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def formatted_date(self):
|
def formatted_date(self):
|
||||||
|
|
||||||
def fget(self):
|
def fget(self):
|
||||||
if self._formatted_date is None:
|
if self._formatted_date is None:
|
||||||
self._formatted_date = strftime(" [%a, %d %b %H:%M]",
|
self._formatted_date = strftime(" [%a, %d %b %H:%M]",
|
||||||
t=self.localtime.timetuple())
|
t=self.localtime.timetuple())
|
||||||
return self._formatted_date
|
return self._formatted_date
|
||||||
|
|
||||||
def fset(self, val):
|
def fset(self, val):
|
||||||
|
if isinstance(val, unicode):
|
||||||
self._formatted_date = val
|
self._formatted_date = val
|
||||||
|
|
||||||
return property(fget=fget, fset=fset)
|
return property(fget=fget, fset=fset)
|
||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user