mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix American Spectator
This commit is contained in:
parent
1ff5c05aaa
commit
d27fc5a06e
@ -18,25 +18,16 @@ class TheAmericanSpectator(BasicNewsRecipe):
|
|||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = 'en'
|
language = 'en'
|
||||||
INDEX = 'http://spectator.org'
|
INDEX = 'http://spectator.org'
|
||||||
|
auto_cleanup = True
|
||||||
conversion_options = {
|
encoding = 'utf-8'
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
'comments' : description
|
'comments' : description
|
||||||
,'tags' : category
|
,'tags' : category
|
||||||
,'language' : language
|
,'language' : language
|
||||||
,'publisher' : publisher
|
,'publisher' : publisher
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_only_tags = [
|
|
||||||
dict(name='div', attrs={'class':'post inner'})
|
|
||||||
,dict(name='div', attrs={'class':'author-bio'})
|
|
||||||
]
|
|
||||||
|
|
||||||
remove_tags = [
|
|
||||||
dict(name='object')
|
|
||||||
,dict(name='div', attrs={'class':['col3','post-options','social']})
|
|
||||||
,dict(name='p' , attrs={'class':['letter-editor','meta']})
|
|
||||||
]
|
|
||||||
|
|
||||||
feeds = [ (u'Articles', u'http://feeds.feedburner.com/amspecarticles')]
|
feeds = [ (u'Articles', u'http://feeds.feedburner.com/amspecarticles')]
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
@ -48,10 +39,10 @@ class TheAmericanSpectator(BasicNewsRecipe):
|
|||||||
link_item2 = soup2.find('div',attrs={'class':'post inner issues'})
|
link_item2 = soup2.find('div',attrs={'class':'post inner issues'})
|
||||||
cover_url = self.INDEX + link_item2.img['src']
|
cover_url = self.INDEX + link_item2.img['src']
|
||||||
return cover_url
|
return cover_url
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
return url + '/print'
|
return url + '/print'
|
||||||
|
|
||||||
def get_article_url(self, article):
|
def get_article_url(self, article):
|
||||||
return article.get('guid', None)
|
return article.get('guid', None)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user