~ubuntu-branches/debian/wheezy/calibre/wheezy

« back to all changes in this revision

Viewing changes to recipes/macity.recipe

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-01-07 11:22:54 UTC
  • mfrom: (29.4.10 precise)
  • Revision ID: package-import@ubuntu.com-20120107112254-n1syr437o46ds802
Tags: 0.8.34+dfsg-1
* New upstream version. (Closes: #654751)
* debian/rules: Do not install calibre copy of chardet; instead, add
  build/binary python-chardet dependency.
* Add disable_plugins.py: Disable plugin dialog. It uses a totally
  non-authenticated and non-trusted way of installing arbitrary code.
  (Closes: #640026)
* debian/rules: Install with POSIX locale, to avoid installing translated
  manpages into the standard locations. (Closes: #646674)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from calibre.web.feeds.news import BasicNewsRecipe
 
2
 
 
3
class AdvancedUserRecipe1325766771(BasicNewsRecipe):
 
4
    title          = u'Macity'
 
5
    language = 'it'
 
6
    oldest_article = 7
 
7
    max_articles_per_feed = 100
 
8
    auto_cleanup = True
 
9
 
 
10
    def get_article_url(self, article):
 
11
        link = BasicNewsRecipe.get_article_url(self, article)
 
12
        if link.split('/')[-1]=="story01.htm":
 
13
            link=link.split('/')[-2]
 
14
            a=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'I', 'L'      , 'N'   , 'S'   ]
 
15
            b=['0', '.', '/', '?', '-', '=', '&', '_', 'http://', '.com', 'www.']
 
16
            for i in range(0,len(a)):
 
17
                link=link.replace('0'+a[-i],b[-i])
 
18
        return link
 
19
 
 
20
    feeds          = [(u'Macity', u'http://www.macitynet.it.feedsportal.com/c/33714/f/599513/index.rss')]
 
21
    __author__      = 'faber1971'
 
22
    description = 'Apple and hi-tech news'
 
23