mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #884266 (Updated recipe for NIN online)
This commit is contained in:
parent
8b0b1ca357
commit
a8b3896c67
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2008-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
www.nin.co.rs
|
www.nin.co.rs
|
||||||
'''
|
'''
|
||||||
@ -29,6 +29,7 @@ class Nin(BasicNewsRecipe):
|
|||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = 'sr'
|
language = 'sr'
|
||||||
publication_type = 'magazine'
|
publication_type = 'magazine'
|
||||||
|
masthead_url = 'http://www.nin.co.rs/img/head/logo.jpg'
|
||||||
extra_css = """
|
extra_css = """
|
||||||
@font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
@font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
||||||
body{font-family: Verdana, Lucida, sans1, sans-serif}
|
body{font-family: Verdana, Lucida, sans1, sans-serif}
|
||||||
@ -72,9 +73,11 @@ class Nin(BasicNewsRecipe):
|
|||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
cover_url = None
|
cover_url = None
|
||||||
soup = self.index_to_soup(self.INDEX)
|
soup = self.index_to_soup(self.INDEX)
|
||||||
link_item = soup.find('img',attrs={'width':'100','border':'0'})
|
for item in soup.findAll('a', href=True):
|
||||||
if link_item:
|
if item['href'].startswith('/pages/issue.php?id='):
|
||||||
cover_url = self.PREFIX + link_item['src']
|
simg = item.find('img')
|
||||||
|
if simg:
|
||||||
|
return self.PREFIX + item.img['src']
|
||||||
return cover_url
|
return cover_url
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user