#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe


class ElNacional(BasicNewsRecipe):
    title = 'ElNacional.cat'
    description = (
        'ElNacional.cat is an online Catalan-language newspaper edited in Barcelona.'
        ' It is ranked 1st by unique monthly visitors among Catalan newspapers,'
        ' with over 3.3 million monthly visitors as at March 2022.'
    )
    oldest_article = 2  # days
    max_articles_per_feed = 30  # articles
    auto_cleanup = True
    language = 'ca'
    __author__ = 'santboia'
    encoding = 'utf-8'
    use_embedded_content = False
    no_stylesheets = True
    remove_attributes = ['style', 'height', 'width']
    ignore_duplicate_articles = {'url'}

    feeds = [
        ('Portada', 'https://www.elnacional.cat/uploads/feeds/feed_ca.xml'),
    ]
