Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert syntax to meet py3 standards #871

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ recipes/*.mobi
recipes/*.epub
recipes/debug
/.metadata/
.idea
/*env*/
7 changes: 4 additions & 3 deletions manual/custom.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai

from __future__ import print_function
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import os, re, textwrap
Expand Down Expand Up @@ -198,12 +199,12 @@ def update_cli_doc(name, raw, app):
old_raw = open(path, 'rb').read() if os.path.exists(path) else ''
if not os.path.exists(path) or old_raw != raw:
import difflib
print path, 'has changed'
print(path, 'has changed')
if old_raw:
lines = difflib.unified_diff(old_raw.splitlines(), raw.splitlines(),
path, path)
for line in lines:
print line
print(line)
app.builder.info('creating '+os.path.splitext(os.path.basename(path))[0])
p = os.path.dirname(path)
if p and not os.path.exists(p):
Expand Down Expand Up @@ -236,7 +237,7 @@ def render_options(cmd, groups, options_header=True, add_program=True, header_le


def mark_options(raw):
raw = re.sub(r'(\s+)--(\s+)', ur'\1``--``\2', raw)
raw = re.sub(r'(\s+)--(\s+)', u'\\1``--``\\2', raw)

def sub(m):
opt = m.group()
Expand Down
6 changes: 3 additions & 3 deletions manual/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def finish(self):
LaTeXBuilder.finish(self)
self.info('Fixing Cyrillic characters...')
tex = os.path.join(self.outdir, 'calibre.tex')
with open(tex, 'r+b') as f:
with open(tex, 'r+') as f:
raw = f.read()
for x in (b'Михаил Горбачёв', b'Фёдор Миха́йлович Достоевский'):
raw = raw.replace(x, br'{\fontencoding{T2A}\selectfont %s}' % (x.replace(b'а́', b'a')))
for x in (u'Михаил Горбачёв', u'Фёдор Миха́йлович Достоевский'):
raw = raw.replace(x, u'{\\fontencoding{T2A}\\selectfont %s}' % (x.replace(u'а́', u'a')))
f.seek(0)
f.write(raw)
7 changes: 4 additions & 3 deletions recipes/DrawAndCook.recipe
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
from calibre.web.feeds.news import BasicNewsRecipe
import re

Expand Down Expand Up @@ -30,7 +31,7 @@ class DrawAndCook(BasicNewsRecipe):
articles = self.make_links(url)
if articles:
feeds.append((title, articles))
print 'feeds are: ', feeds
print('feeds are: ', feeds)
return feeds

def make_links(self, url):
Expand All @@ -45,9 +46,9 @@ class DrawAndCook(BasicNewsRecipe):
'li', attrs={'data-id': re.compile(r'artwork_entry_\d+', re.DOTALL)})
for recipe in recipes:
page_url = self.INDEX + recipe.a['href']
print 'page_url is: ', page_url
print('page_url is: ', page_url)
title = recipe.find('strong').string
print 'title is: ', title
print('title is: ', title)
current_articles.append(
{'title': title, 'url': page_url, 'description': '', 'date': date})
return current_articles
Expand Down
3 changes: 2 additions & 1 deletion recipes/al_monitor.recipe
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
from __future__ import print_function
__license__ = 'GPL v3'
__copyright__ = '2014, spswerling'
'''
http://www.al-monitor.com/
Expand Down
9 changes: 5 additions & 4 deletions recipes/am730.recipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vim:fileencoding=UTF-8
from __future__ import unicode_literals
from __future__ import print_function
__license__ = 'GPL v3'
__copyright__ = '2013, Eddie Lau'
__Date__ = ''
Expand Down Expand Up @@ -60,7 +61,7 @@ class AM730(BasicNewsRecipe):
title = href.split('/')[-1].split('-')[0]
title = urllib.unquote(title.encode('ASCII')) # .decode('utf-8')
if self.debug:
print title
print(title)
try:
if articles.index({'title':title,'url':href})>=0:
# print 'already added'
Expand All @@ -73,7 +74,7 @@ class AM730(BasicNewsRecipe):
if (len(articles) >= self.max_articles_per_feed):
break
if self.debug:
print articles
print(articles)
return (sectionName,articles)

def parse_index(self):
Expand All @@ -89,8 +90,8 @@ class AM730(BasicNewsRecipe):
SectionsArticles=[]
for (title, url) in Sections:
if self.debug:
print title
print url
print(title)
print(url)
SectionsArticles.append(self.getAMSectionArticles(title,url))
# feeds.append(articles[0]['url'])
return SectionsArticles
2 changes: 1 addition & 1 deletion recipes/android_com_pl.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class Android_com_pl(BasicNewsRecipe):
remove_tags_after = [{'class': 'post-content'}]
remove_tags = [dict(name='ul', attrs={'class': 'tags small-tags'}), dict(name='a', attrs={'onclick': 'return ss_plugin_loadpopup_js(this);'})]
preprocess_regexps = [
(re.compile(ur'<p>.{,1}</p>', re.DOTALL), lambda match: '')]
(re.compile(u'<p>.{,1}</p>', re.DOTALL), lambda match: '')]
feeds = [(u'Android', u'http://android.com.pl/feed/')]
4 changes: 2 additions & 2 deletions recipes/appledaily_tw.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class AppledailyTW(BasicNewsRecipe):
]

def preprocess_raw_html(self, raw_html, url):
raw_html = re.sub(ur'<a href=".*?<br><br>.*?<\/a>', '', raw_html)
raw_html = re.sub(unicode(r'<a href=".*?<br><br>.*?<\/a>'), '', raw_html)
raw_html = re.sub(
ur'<title>(.*?)[\s]+\|.*<\/title>', '<title>\1<\/title>', raw_html)
unicode(r'<title>(.*?)[\s]+\|.*<\/title>', '<title>\1<\/title>'), raw_html)
return raw_html
5 changes: 3 additions & 2 deletions recipes/auto_prove.recipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python2
__license__ = 'GPL v3'
from __future__ import print_function
__license__ = 'GPL v3'
__author__ = 'GabrieleMarini, based on Darko Miletic'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>, Gabriele Marini'
__version__ = 'v1.02 Marini Gabriele '
Expand Down Expand Up @@ -56,7 +57,7 @@ class AutoPR(BasicNewsRecipe):
]:
soup = self.index_to_soup(url)
soup = soup.find('channel')
print soup
print(soup)

for article in soup.findAllNext('item'):
title = self.tag_to_string(article.title)
Expand Down
4 changes: 2 additions & 2 deletions recipes/benchmark_pl.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class BenchmarkPl(BasicNewsRecipe):
extra_css = 'ul {list-style-type: none;}'
no_stylesheets = True
use_embedded_content = False
preprocess_regexps = [(re.compile(ur'<h3><span style="font-size: small;">&nbsp;Zobacz poprzednie <a href="http://www.benchmark.pl/news/zestawienie/grupa_id/135">Opinie dnia:</a></span>.*</body>', # noqa
re.DOTALL | re.IGNORECASE), lambda match: '</body>'), (re.compile(ur'Więcej o .*?</ul>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa
preprocess_regexps = [(re.compile(u'<h3><span style="font-size: small;">&nbsp;Zobacz poprzednie <a href="http://www.benchmark.pl/news/zestawienie/grupa_id/135">Opinie dnia:</a></span>.*</body>', # noqa
re.DOTALL | re.IGNORECASE), lambda match: '</body>'), (re.compile(u'Więcej o .*?</ul>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa

keep_only_tags = [dict(id=['articleHeader', 'articleGallery']), dict(
name='div', attrs={'class': ['m_zwykly', 'gallery']}), dict(id='article')]
Expand Down
9 changes: 5 additions & 4 deletions recipes/birmingham_post.recipe
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
from calibre.web.feeds.news import BasicNewsRecipe
import re
import mechanize
Expand Down Expand Up @@ -26,11 +27,11 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
# look for the block containing the sun button and url
cov = soup.find(attrs={'height': re.compile(
'3'), 'alt': re.compile('Post')})
print
print '%%%%%%%%%%%%%%%', cov
print
print()
print('%%%%%%%%%%%%%%%', cov)
print()
cov2 = str(cov['src'])
print '88888888 ', cov2, ' 888888888888'
print('88888888 ', cov2, ' 888888888888')

# cover_url=cov2
# return cover_url
Expand Down
5 changes: 3 additions & 2 deletions recipes/brewiarz.recipe
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python2

__license__ = 'GPL v3'
from __future__ import print_function
__license__ = 'GPL v3'

from calibre.web.feeds.news import BasicNewsRecipe
import datetime
Expand Down Expand Up @@ -142,7 +143,7 @@ class brewiarz(BasicNewsRecipe):
if x == tag:
break
else:
print "Can't find", tag, "in", tag.parent
print("Can't find", tag, "in", tag.parent)
continue
for r in reversed(tag.contents):
tag.parent.insert(i, r)
Expand Down
1 change: 1 addition & 0 deletions recipes/calgary_herald.recipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import print_function
__license__ = 'GPL v3'

'''
Expand Down
4 changes: 2 additions & 2 deletions recipes/ciekawostki_historyczne.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Ciekawostki_Historyczne(BasicNewsRecipe):
max_articles_per_feed = 100
extra_css = 'img.alignleft {float:left; margin-right:5px;} .alignright {float:right; margin-left:5px;}'
oldest_article = 12
preprocess_regexps = [(re.compile(ur'Ten artykuł ma kilka stron.*?</fb:like>', re.DOTALL),
lambda match: ''), (re.compile(ur'<h2>Zobacz też:</h2>.*?</ol>', re.DOTALL), lambda match: '')]
preprocess_regexps = [(re.compile(u'Ten artykuł ma kilka stron.*?</fb:like>', re.DOTALL),
lambda match: ''), (re.compile(u'<h2>Zobacz też:</h2>.*?</ol>', re.DOTALL), lambda match: '')]
no_stylesheets = True
remove_empty_feeds = True
keep_only_tags = [dict(name='div', attrs={'class': 'post'})]
Expand Down
7 changes: 4 additions & 3 deletions recipes/cio_magazine.recipe
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
# Los primeros comentarios son las dificultades que he tenido con el Piton
# Cuando da error UTF8 revisa los comentarios (acentos). En notepad++ Search, Goto, posicion y lo ves.
# Editar con Notepad++ Si pone - donde no debe es que ha indentado mal... Edit - Blank operations - tab to space
Expand Down Expand Up @@ -87,7 +88,7 @@ class CIO_Magazine(BasicNewsRecipe):
if INDEX.startswith('/'): # protegiendonos de que dejen de usarlos
INDEX = 'http://www.cio.com' + INDEX
# Y nos aseguramos en los logs que lo estamos haciendo bien
print ("INDEX en parse_index: ", INDEX)
print("INDEX en parse_index: ", INDEX)

# Ya sabemos cual es la revista... procesemosla.
soup = self.index_to_soup(INDEX)
Expand All @@ -103,7 +104,7 @@ class CIO_Magazine(BasicNewsRecipe):

if div['class'] == 'heading':
key = string.capwords(self.tag_to_string(div.span))
print ("Key: ", key) # Esto es para depurar
print("Key: ", key) # Esto es para depurar
articles[key] = []
feeds.append(key)

Expand All @@ -126,7 +127,7 @@ class CIO_Magazine(BasicNewsRecipe):

if summary:
description = self.tag_to_string(summary, use_alt=False)
print ("Description = ", description)
print("Description = ", description)

# Esto esta copiado del NY times
feed = key if key is not None else 'Uncategorized'
Expand Down
4 changes: 2 additions & 2 deletions recipes/cnetjapan.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class CNetJapan(BasicNewsRecipe):
remove_javascript = True

preprocess_regexps = [
(re.compile(ur'<!--\u25B2contents_left END\u25B2-->.*</body>', re.DOTALL | re.IGNORECASE | re.UNICODE),
(re.compile(unicode(r'<!--\u25B2contents_left END\u25B2-->.*</body>'), re.DOTALL | re.IGNORECASE | re.UNICODE),
lambda match: '</body>'),
(re.compile(r'<!--AD_ELU_HEADER-->.*</body>', re.DOTALL | re.IGNORECASE),
lambda match: '</body>'),
(re.compile(ur'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->', re.UNICODE),
(re.compile(unicode(r'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->'), re.UNICODE),
lambda match: '<!-- removed -->'),
]

Expand Down
4 changes: 2 additions & 2 deletions recipes/cnetjapan_digital.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class CNetJapanDigital(BasicNewsRecipe):
remove_javascript = True

preprocess_regexps = [
(re.compile(ur'<!--\u25B2contents_left END\u25B2-->.*</body>', re.DOTALL | re.IGNORECASE | re.UNICODE),
(re.compile(unicode(r'<!--\u25B2contents_left END\u25B2-->.*</body>'), re.DOTALL | re.IGNORECASE | re.UNICODE),
lambda match: '</body>'),
(re.compile(r'<!--AD_ELU_HEADER-->.*</body>', re.DOTALL | re.IGNORECASE),
lambda match: '</body>'),
(re.compile(ur'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->', re.UNICODE),
(re.compile(unicode(r'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->'), re.UNICODE),
lambda match: '<!-- removed -->'),
]

Expand Down
4 changes: 2 additions & 2 deletions recipes/cnetjapan_release.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class CNetJapanRelease(BasicNewsRecipe):
remove_javascript = True

preprocess_regexps = [
(re.compile(ur'<!--\u25B2contents_left END\u25B2-->.*</body>', re.DOTALL | re.IGNORECASE | re.UNICODE),
(re.compile(unicode(r'<!--\u25B2contents_left END\u25B2-->.*</body>'), re.DOTALL | re.IGNORECASE | re.UNICODE),
lambda match: '</body>'),
(re.compile(r'<!--AD_ELU_HEADER-->.*</body>', re.DOTALL | re.IGNORECASE),
lambda match: '</body>'),
(re.compile(ur'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->', re.UNICODE),
(re.compile(unicode(r'<!-- \u25B2\u95A2\u9023\u30BF\u30B0\u25B2 -->.*<!-- \u25B2ZDNet\u25B2 -->'), re.UNICODE),
lambda match: '<!-- removed -->'),
]

Expand Down
2 changes: 1 addition & 1 deletion recipes/computerworld_pl.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Computerworld_pl(BasicNewsRecipe):
max_articles_per_feed = 100
use_embedded_content = False
preprocess_regexps = [(re.compile(u'Zobacz również:', re.IGNORECASE), lambda m: ''),
(re.compile(ur'[*]+reklama[*]+', re.IGNORECASE), lambda m: ''), ]
(re.compile(u'[*]+reklama[*]+', re.IGNORECASE), lambda m: ''), ]
keep_only_tags = [dict(name='article')]
remove_tags = [dict(attrs={'class': ['share_tools nocontent', 'rec']}),
dict(name='ul',attrs={'class':'tags'}),
Expand Down
3 changes: 2 additions & 1 deletion recipes/daily_express.recipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vim:fileencoding=UTF-8
from __future__ import unicode_literals
from __future__ import print_function

import re

Expand Down Expand Up @@ -65,7 +66,7 @@ class AdvancedUserRecipe1390132023(BasicNewsRecipe):
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
for article in feed.articles[:]:
print 'article.title is: ', article.title
print('article.title is: ', article.title)
if 'WATCH:' in article.title.upper():
feed.articles.remove(article)

Expand Down
3 changes: 2 additions & 1 deletion recipes/dilemaveche.recipe
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-

__license__ = 'GPL v3'
from __future__ import print_function
__license__ = 'GPL v3'
__copyright__ = u'2014-01-09, Silviu Cotoar\u0103, Marius Popescu'
'''
dilemaveche.ro
Expand Down
3 changes: 2 additions & 1 deletion recipes/dnevnik_mk.recipe
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python2
from __future__ import print_function

__author__ = 'Darko Spasovski'
__license__ = 'GPL v3'
Expand Down Expand Up @@ -64,7 +65,7 @@ class Dnevnik(BasicNewsRecipe):
containerTable = section.findPrevious(
name='table').findNextSibling(name='table')
if containerTable is None:
print 'No container table found - page layout may have been changed.'
print('No container table found - page layout may have been changed.')
continue
articles = []
for article in containerTable.findAll('a', attrs={'class': 'WB_DNEVNIK_ArhivaFormText'}):
Expand Down
2 changes: 1 addition & 1 deletion recipes/dobreprogamy.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Dobreprogramy_pl(BasicNewsRecipe):
max_articles_per_feed = 100
remove_attrs = ['style', 'width', 'height']
preprocess_regexps = [(re.compile(
ur'<div id="\S+360pmp4">Twoja przeglądarka nie obsługuje Flasha i HTML5 lub wyłączono obsługę JavaScript...</div>'), lambda match: '')]
unicode(r'<div id="\S+360pmp4">Twoja przeglądarka nie obsługuje Flasha i HTML5 lub wyłączono obsługę JavaScript...</div>')), lambda match: '')]
keep_only_tags = [dict(name='h1'), dict(
attrs={'class': ['entry single']}), dict(id='phContent_divArticle')]
remove_tags = [dict(attrs={'class': ['newsOptions', 'noPrint', 'komentarze', 'tags font-heading-master', 'social nested-grid grid-margin-px15-top clearfix no-mobile', 'page-info text-h4 font-heading grid-margin-px15-top color-annotation clearfix', 'series grid-margin-px30-top']}), dict(id='komentarze'), dict(id='phContent_ctl02_sBreadcrumb'), dict(name='iframe')] # noqa
Expand Down
4 changes: 2 additions & 2 deletions recipes/dziennik_wschodni.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class DziennikWschodni(BasicNewsRecipe):
no_stylesheets = True
ignore_duplicate_articles = {'title', 'url'}

preprocess_regexps = [(re.compile(ur'Czytaj:.*?</a>', re.DOTALL), lambda match: ''), (re.compile(ur'Przeczytaj także:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), # noqa
(re.compile(ur'Przeczytaj również:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), (re.compile(ur'Zobacz też:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa
preprocess_regexps = [(re.compile(u'Czytaj:.*?</a>', re.DOTALL), lambda match: ''), (re.compile(u'Przeczytaj także:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), # noqa
(re.compile(u'Przeczytaj również:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), (re.compile(u'Zobacz też:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa

keep_only_tags = [dict(id=['article', 'cover', 'photostory'])]
remove_tags = [dict(id=['articleTags', 'articleMeta', 'boxReadIt', 'articleGalleries', 'articleConnections',
Expand Down
4 changes: 2 additions & 2 deletions recipes/echo_dnia.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class EchoDnia(BasicNewsRecipe):
use_embedded_content = False
ignore_duplicate_articles = {'title', 'url'}

preprocess_regexps = [(re.compile(ur'Czytaj:.*?</a>', re.DOTALL), lambda match: ''), (re.compile(ur'Przeczytaj także:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), # noqa
(re.compile(ur'Przeczytaj również:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), (re.compile(ur'Zobacz też:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa
preprocess_regexps = [(re.compile(u'Czytaj:.*?</a>', re.DOTALL), lambda match: ''), (re.compile(u'Przeczytaj także:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), # noqa
(re.compile(u'Przeczytaj również:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: ''), (re.compile(u'Zobacz też:.*?</a>', re.DOTALL | re.IGNORECASE), lambda match: '')] # noqa

keep_only_tags = [dict(id=['article', 'cover', 'photostory'])]
remove_tags = [dict(id=['articleTags', 'articleMeta', 'boxReadIt', 'articleGalleries', 'articleConnections',
Expand Down
1 change: 1 addition & 0 deletions recipes/edmonton_journal.recipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import print_function
__license__ = 'GPL v3'

'''
Expand Down
3 changes: 2 additions & 1 deletion recipes/el_cultural.recipe
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
from calibre.web.feeds.recipes import BasicNewsRecipe


Expand Down Expand Up @@ -31,7 +32,7 @@ class RevistaElCultural(BasicNewsRecipe):

# TO GET ARTICLES IN SECTION
def ec_parse_section(self, url, titleSection):
print 'Section: ' + titleSection
print('Section: ' + titleSection)
soup = self.index_to_soup(url)
div = soup.find(attrs={'id': 'gallery'})
current_articles = []
Expand Down
Loading