diff --git a/recipes/el_diplo.recipe b/recipes/el_diplo.recipe index 4b51ffc79f..2e4e4ae0c1 100644 --- a/recipes/el_diplo.recipe +++ b/recipes/el_diplo.recipe @@ -1,9 +1,8 @@ # -*- mode: python; coding: utf-8; -*- # vim: set syntax=python fileencoding=utf-8 -from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' -__copyright__ = '2020, Darko Miletic ' +__copyright__ = '2021, Darko Miletic ' ''' www.eldiplo.org @@ -27,6 +26,7 @@ class ElDiplo2020(BasicNewsRecipe): remove_empty_feeds = True publication_type = 'magazine' auto_cleanup = True + auto_cleanup_keep = '//div[contains(@class, "autor")] | //div[@class="edicion"]' delay = 1 simultaneous_downloads = 1 timeout = 8 @@ -38,12 +38,13 @@ class ElDiplo2020(BasicNewsRecipe): handle_gzip = True compress_news_images = True scale_news_images_to_device = True - masthead_url = 'https://www.eldiplo.org/wp-content/themes/eldiplo/img/logo.png' + masthead_url = 'https://www.eldiplo.org/wp-content/themes/_polenta_/assets/diplo.png' INDEX = 'https://www.eldiplo.org/' + extra_css = """ - body{font-family: Roboto, sans-serif} - .entry-title{font-family: Spectral, serif} + body{font-family: "GT Super", serif} + .autor{font-family: Inter, serif} """ conversion_options = { @@ -63,11 +64,10 @@ class ElDiplo2020(BasicNewsRecipe): def parse_index(self): articles = [] soup = self.index_to_soup(self.INDEX) - mylink = soup.find('a', {'class':'edicion_cover'}) + mylink = soup.find('span', text='Sumario') if mylink is None: - return None - self.cover_url = mylink.img['src'] - indexurl = mylink['href'] + return None + indexurl = "https://www.eldiplo.org" + mylink.parent['href'] self.log(indexurl) parts = indexurl.split('www.eldiplo.org/', 1) series = parts[1].split('-', 1)[0]