from calibre.web.feeds.recipes import BasicNewsRecipe


class WorkersWorld(BasicNewsRecipe):

    title = u'Workers World'
    description = u'Socialist news and analysis'
    __author__ = u'urslnx'
    no_stylesheets = True
    use_embedded_content = False
    remove_javascript = True
    oldest_article = 7
    max_articles_per_feed = 100
    encoding = 'utf8'
    publisher = 'workers.org'
    category = 'news, politics, USA, world'
    language = 'en'
    publication_type = 'newsportal'
    extra_css = ' body{ font-family: Verdana,Arial,Helvetica,sans-serif; } h1{ font-size: x-large; text-align: left; margin-top:0.5em; margin-bottom:0.25em; } h2{ font-size: large; }  p{ text-align: left; } .published{ font-size: small; } .byline{ font-size: small; } .copyright{ font-size: small; } '  # noqa
    remove_tags_before = dict(name='div', attrs={'id': 'evernote'})
    remove_tags_after = dict(name='div', attrs={'id': 'footer'})

    masthead_url = 'http://www.workers.org/graphics/wwlogo300.gif'
    cover_url = 'http://www.workers.org/pdf/current.jpg'
    feeds = [(u'Headlines', u'http://www.workers.org/rss/nonstandard_rss.xml'),
             ]
