From f65eb7eb5077e97b786fa81170a2a1da603d5cf4 Mon Sep 17 00:00:00 2001 From: Kennyl Date: Sat, 28 Jan 2017 21:20:42 +0800 Subject: [PATCH] Clean more tags Clean meta, link tags in head tag --- recipes/apple_daily.recipe | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/apple_daily.recipe b/recipes/apple_daily.recipe index 688e692c1f..1415af1e2c 100644 --- a/recipes/apple_daily.recipe +++ b/recipes/apple_daily.recipe @@ -39,7 +39,9 @@ class AppleDaily(BasicNewsRecipe): extra_css = 'img {display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; max-height:90%;} h1 {font-size:125%; text-align:left; font-weight:bold;} p{font-size:90%;} p[class=video-caption] {font-size:50%; margin-left:auto; margin-right:auto;}' # noqa keep_only_tags = [dict(name='div', attrs={'id': 'content-article'})] remove_tags = [dict(name='div', attrs={'class': 'prev-next-btn'}), - dict(name='p', attrs={'class': 'next'})] + dict(name='p', attrs={'class': 'next'}), + dict(name='meta'), + dict(name='link')]] def get_dtlocal(self): dt_utc = datetime.datetime.utcnow()