View Single Post
Old 09-22-2010, 12:37 PM   #2810
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Starson17,
Do you mind looking at this when you get a sec and telling me what the heck I'm doing wrong as far as the css is concerned please?
What my objective is, is to change this
Code:
Egypt’s housing market recovers!
it has the tag format of <div class="cdmainarticle">Egypt’s housing market recovers!</div>
So based on what I have gathered from other recipes and from you my code "should reformat it", but it doesn't.

Spoiler:

Code:
from calibre.web.feeds.news import BasicNewsRecipe

class GlobalProperty(BasicNewsRecipe):
    title = 'Global Property Guide'
    language = 'en'
    __author__ = 'TonytheBookworm'
    description = 'This is a site for residential property investors who want to buy houses or apartments in other countries'
    publisher = 'GlobalPropertyGuide.com'
    category = 'prices,real-estate'
    oldest_article = 10
    max_articles_per_feed = 100
    no_stylesheets = True
    extra_css = 'div.cdmainarticle{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}'
    
    keep_only_tags    = [
                         dict(name='div', attrs={'class':['cd_mainbody']})
                        ]
    remove_tags = [
                   dict(name='div', attrs={'class':['addthis_toolbox addthis_default_style']}),
                   
                  ]                    
    feeds          = [
                      ('Main Feed', 'http://www.globalpropertyguide.com/rss'),
                      
                    ]
TonytheBookworm is offline