![]() |
#1 |
Connoisseur
![]() Posts: 82
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
New recipe - House News (主場新聞)
Could Kovid or other Calibre developer upload the following recipe to the next Calibre release? Thanks.
Code:
__license__ = 'GPL v3' __copyright__ = '2012, Eddie Lau' class AdvancedUserRecipeHouseNews(BasicNewsRecipe): title = u'House News \u4e3b\u5834\u65b0\u805e' __author__ = 'Eddie Lau' publisher = 'House News' oldest_article = 1 max_articles_per_feed = 100 auto_cleanup = False language = 'zh' encoding = 'utf-8' description = 'http://thehousenews.com' category = 'Chinese, Blogs, Opinion, News, Hong Kong' masthead_url = 'http://thehousenews.com/static/images/housebeta.jpg' extra_css = 'img {display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; max-height:90%;} p[class=date] {font-size:50%;} div[class=author] {font-size:75%;} p[class=caption] {font-size:50%;}' feeds = [(u'Latest', u'http://thehousenews.com/rss/')] keep_only_tags = [dict(name='h1'), dict(name='div', attrs={'class':['photo']}), dict(name='p', attrs={'class':'caption'}), dict(name='div', attrs={'class':'articleTextWrap'}), dict(name='div', attrs={'class':['author']}), dict(name='p', attrs={'class':'date'})] def populate_article_metadata(self, article, soup, first): if first and hasattr(self, 'add_toc_thumbnail'): picdiv = soup.find('img') if picdiv is not None: self.add_toc_thumbnail(article,picdiv['src']) |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fairbanks Daily News-miner News Recipe Submission | rogerx | Recipes | 2 | 08-25-2011 07:30 PM |
New Fairbanks Daily News-miner News Recipe -- Need Date inclusion only | rogerx | Recipes | 5 | 08-24-2011 09:12 AM |
Recipe for The World Today (Chatham House) | bleavett | Recipes | 0 | 02-09-2011 04:11 PM |
House Beautiful magazine cites MobileRead as a source for ebook news | tracyeo | News | 3 | 11-26-2008 11:57 AM |
Other Fiction 李寶嘉: 官場現形記 (Traditional Chinese) | ericshliao | Other Books | 0 | 09-13-2008 01:06 PM |