calibre/recipes/macity.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

26 lines
885 B
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1325766771(BasicNewsRecipe):
title = u'Macity'
language = 'it'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
def get_article_url(self, article):
link = BasicNewsRecipe.get_article_url(self, article)
if link.split('/')[-1] == "story01.htm":
link = link.split('/')[-2]
a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'I', 'L', 'N', 'S']
b = ['0', '.', '/', '?', '-', '=', '&',
'_', 'http://', '.com', 'www.']
for i in range(0, len(a)):
link = link.replace('0' + a[-i], b[-i])
return link
feeds = [
(u'Macity', u'http://www.macitynet.it.feedsportal.com/c/33714/f/599513/index.rss')]
__author__ = 'faber1971'
description = 'Apple and hi-tech news'