news download crashes with TypeError: '<' not supported between instances of 'float' and 'str'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi there. Many news recipe in Argentina have been down for a while. Without any knowledge of programming, I have managed to make one of them work ("Clarín") by simply removing the pre and postprocesses lines. It worked (I published th updated recipe somewhere else, but I can´t remember now), but only for a few days. Now I´m getting a different error, and of course I can´t deal with it. The error seems to be the one in the title:
TypeError: '<' not supported between instances of 'float' and 'str'
I have updated calibre to the last version (5.34) and running it on Windows 10.
So, I´ll copy below the modified recipe, and attach the crash report in a txt file.
Thanks to all of you who make Calibre and keep it working.
UPDATED RECIPE
#!/usr/bin/env python
# -*- mode: python -*-
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
__license__ = 'GPL v3'
__copyright__ = '2008-2016, Darko Miletic <darko.miletic at gmail.com>'
'''
clarin.com
'''
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
from calibre import strftime
from calibre.
class Clarin(
title = 'Clarín'
__author__ = 'Darko Miletic, updated by GGsalas'
description = 'Clarin.com. Noticias de la Argentina y el mundo. Información actualizada las 24 horas y en español. Informate ya'
publisher = 'Grupo Clarin'
category = 'news, politics, Argentina'
oldest_article = 1
max_
use_
no_stylesheets = True
encoding = 'utf8'
delay = 1
language = 'es_AR'
publication
needs_
INDEX = 'http://
LOGIN = 'https:/
masthead_url = 'http://
cover_url = strftime('http://
compress_
scale_
compress_
scale_
handle_gzip = True
# To get all the data (images)
auto_cleanup = False
extra_css = """
h1#title {
margin: 0 0 .5em 0;
}
p.volanta {
font-size: .7em;
}
.bajada h2 {
font-size: 1em;
color: #666666;
margin: 0 0 1em 0;
}
.figcaption {
font-style: italic;
font-size: .9em;
}
"""
conversion_
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
}
keep_only_tags = [
dict(name='p' , attrs={'class' : 'volanta'}),
dict(
dict(
dict(
dict(
]
remove_tags = [
]
remove_
remove_
# Images on hightlights view
def populate_
if first and hasattr(self, 'add_toc_
picdiv = soup.find('img')
if picdiv is not None:
feeds = [
(u'Lo Ultimo', u'http://
(u'Politica', u'http://
(u'Opinion', u'https:/
(u'Cultura', u'https:/
(u'Economia', u'https:/
(
(u'RevistaN', u'https:/
(u'Viva', u'https:/
(u'Deportes', u'http://
(u'Mundo', u'http://
(
(u'Sociedad', u'http://
(u'Ciudades', u'http://
(
(u'Internet', u'http://
]
def get_browser(self):
br = BasicNewsRecipe
return br
description: | updated |
Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.
status fixreleased