calibre/recipes/uninohimitu.recipe
Hiroshi Miura 521a8f93c1 update japanese recipes
- update:
  endgaget jp
  Kahoku Shinpo
  MSN Sankei News
  Uni no Himitsu
- remove problematic recipes:
  nikkei_sub*
  chou chou blog

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2014-05-06 17:16:20 +09:00

37 lines
1.2 KiB
Plaintext

__license__ = 'GPL v3'
__copyright__ = '2010,2014, Hiroshi Miura <miurahr@linux.com>'
'''
http://ameblo.jp/sauta19/
'''
import re
from calibre.web.feeds.news import BasicNewsRecipe
class UniNoHimituKichiBlog(BasicNewsRecipe):
title = u'Uni secret base'
__author__ = 'Hiroshi Miura'
oldest_article = 2
publication_type = 'blog'
max_articles_per_feed = 20
description = 'Japanese famous Cat blog'
publisher = ''
category = 'cat, pet, japan'
language = 'ja'
encoding = 'utf-8'
keep_only_tags = [{'class':'entry_head'},{'class':'subContentsInner'}]
feeds = [(u'blog', u'http://feedblog.ameba.jp/rss/ameblo/sauta19/rss20.xml')]
def parse_feeds(self):
feeds = BasicNewsRecipe.parse_feeds(self)
for curfeed in feeds:
delList = []
for a,curarticle in enumerate(curfeed.articles):
if re.search(r'rssad.jp', curarticle.url):
delList.append(curarticle)
if len(delList)>0:
for d in delList:
index = curfeed.articles.index(d)
curfeed.articles[index:index+1] = []
return feeds