Implement #4689 (Updated recipe for Pagina 12)

This commit is contained in:
Kovid Goyal 2010-01-26 08:51:32 -07:00
parent ff081d1515
commit 78888577c5

View File

@ -1,10 +1,12 @@
__license__ = 'GPL v3'
__copyright__ = '2008-2009, Darko Miletic <darko.miletic at gmail.com>'
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
'''
pagina12.com.ar
'''
import time
from calibre import strftime
from calibre.web.feeds.news import BasicNewsRecipe
class Pagina12(BasicNewsRecipe):
@ -19,6 +21,8 @@ class Pagina12(BasicNewsRecipe):
encoding = 'cp1252'
use_embedded_content = False
language = 'es'
remove_empty_feeds = True
extra_css = ' body{font-family: sans-serif} '
conversion_options = {
'comment' : description
@ -47,3 +51,8 @@ class Pagina12(BasicNewsRecipe):
def print_version(self, url):
return url.replace('http://www.pagina12.com.ar/','http://www.pagina12.com.ar/imprimir/')
def get_cover_url(self):
imgnames = ['tapan.jpg','tapagn.jpg','tapan_gr.jpg','tapagn.jpg','tapagn.jpg','tapan.jpg','tapagn.jpg']
weekday = time.localtime().tm_wday
return strftime('http://www.pagina12.com.ar/fotos/%Y%m%d/diario/') + imgnames[weekday]