from calibre.web.feeds.news import BasicNewsRecipe


class AdvancedUserRecipe1313512459(BasicNewsRecipe):
    title = u'NTVSpor'
    __author__ = 'A Erdogan'
    description = 'News from Turkey'
    publisher = 'NTVSpor.net'
    category = 'sports, Turkey'
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    use_embedded_content = False
    masthead_url = 'http://www.ntvspor.net/HTML/r/i/l.png'
    language = 'tr'

    extra_css             = '''
        body{font-family:Arial,Helvetica,sans-serif; font-size:small; align:left;  color:#000000}
        h1{font-size:large; color:#000000}
        h2{font-size:small; color:#000000}
        p{font-size:small; color:#000000}
    '''

    conversion_options = {
        'comment': description, 'tags': category, 'publisher': publisher, 'language': language
    }

    remove_tags = [
        dict(name=['embed', 'il', 'ul', 'iframe', 'object', 'link', 'base']),
        dict(name='div', attrs={'id': 'contentPhotoGallery'}),
        dict(name='div', attrs={'class': 'SocialMediaWrapper'}),
        dict(name='div', attrs={'class': 'grid2'}),
        dict(name='div', attrs={'class': 'grid8'}),
        dict(name='div', attrs={'id': 'anonsBar'}),
        dict(name='div', attrs={'id': 'header'})]
    remove_tags_before = dict(name='h1', attrs={'style': ['margin-top: 6px;']})
    remove_tags_after = dict(name='div', attrs={'id': 'newsBody'})
    feeds = [(u'NTVSpor', u'http://www.ntvspor.net/Rss/anasayfa')]
