View Single Post
Old 05-26-2010, 10:27 AM   #1
gagsays
Member
gagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheesegagsays can extract oil from cheese
 
Posts: 20
Karma: 1000
Join Date: Oct 2009
Device: kindle 3 wifi
Unhappy Need help regarding custom recipe

I have made a recipe for www.qj.net site using its rss feed. It is working as expected but there is one major flaw that i can't seem to correct. Heading of any post is not visible in the ebooks because its font color is white (white font text on white background = not visible).
I tried to correct it using css (h2,.aHead {color: #000000;}) but i wont work.
Headings in actual site are also white.


Can u please help me correct this.
-----------------------------------------------------------------
from calibre.web.feeds.news import BasicNewsRecipe

class QJ(BasicNewsRecipe):
title = 'QJ'
oldest_article = 7
max_articles_per_feed = 2
language = 'en'
encoding = 'utf8'
publisher = 'Quick Jump'
category = 'video games,ps3,pc,psp,xbox 360'
__author__ = 'gagsays'
#cover_url = 'http://www.qj.net/img/ps3.jpg'
description = 'Quick Jump Network'
timefmt = ' [%a, %d %b, %Y]'
no_stylesheets = True
remove_stylesheets = True
use_embedded_content = False
conversion_options = {
'base_font_size' : 16,
'title' : title,
'tags' : category,
'author' : __author__,
'comment' : description,
'publisher' : publisher,
}
##################################
extra_css = '''
body {color: #000000;font-size: medium;}
h2 {color: #000000;}
strong {font-size: large;text-decoration: underline; font-weight: bold; font-style:italic;color:#454545;padding-left:5px;}
.aHead {color: inherit;font-size: x-large; text-align: center;}
p + p { margin-top: 0.25em; }
img{margin-bottom: 0.25em;}
a { text-decoration: none;}
.contentheading {}
.pfirst {font-size: small; text-align: left; text-decoration:none;}
.posted {font-size: small; text-align: left; text-decoration:none;}
table.v4 {text-align: left; font-size: small;}
'''
##################################
keep_only_tags = [
dict(name='div', attrs={'class':['articles']})
#,dict(name='div', attrs={'id':['comments','comments-list-0']})
#,dict(name='div',attrs={'class':'comments-list'})
#,dict(name='a',attrs={'class':'refresh'})
]
remove_tags_after = [
dict(name='div', attrs={'id':['comments-list-0']})
,dict(name='div',attrs={'id':'shoppingapi'})
]
remove_tags = [
dict(name=['script'])
,dict(name='div', attrs={'class':['misc','top15','toplinks']})
,dict(name='div', attrs={'class':['footer','categories','footer']})
,dict(name='div', attrs={'align':'center'})
,dict(name='span', attrs={'class':['comments-buttons','comment-date','plast','jSp']}) #comments
,dict(name='div', attrs={'id':['jc']}) #comments
#,dict(name='td', attrs={'class':'v4'}) #votes
]
feeds = [
(u'PS 3', u'http://feeds.feedburner.com/QjPlaystation3NewsOpinionsBlogsandMore?format=xml' )
#,('PSP', 'http://feeds.feedburner.com/QjPSPUpdatesNewsOpinionsBlogsandMore?format=xml')
#,('PC', 'http://feeds.feedburner.com/QjPCGamesNewsOpinionsBlogsandMore?format=xml')
]
-------------------------------------------------------------------
gagsays is offline   Reply With Quote