mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Arbetaren
Fixes #1690617 [Update Arbetaren recipe](https://bugs.launchpad.net/calibre/+bug/1690617)
This commit is contained in:
parent
d79cfbca8f
commit
e9297c21f6
@ -1,10 +1,13 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=utf-8
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class Arbetaren_SE(BasicNewsRecipe):
|
||||
title = u'Arbetaren'
|
||||
__author__ = 'Joakim Lindskog'
|
||||
description = 'Nyheter fr\xc3\xa5n Arbetaren'
|
||||
__author__ = 'Jonatan Nyberg'
|
||||
description = u'Nyheter fr\xe5n Arbetaren'
|
||||
publisher = 'Arbetaren'
|
||||
category = 'news, politics, socialism, Sweden'
|
||||
oldest_article = 7
|
||||
@ -14,19 +17,9 @@ class Arbetaren_SE(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
encoding = 'utf-8'
|
||||
language = 'sv'
|
||||
auto_cleanup = True
|
||||
auto_cleanup_keep = '//div[@class="thumbnail"]'
|
||||
auto_cleanup_keep = '//div[@id="article-image"]'
|
||||
auto_cleanup_keep = '//div[@id="article-image"]|//span[@class="important"]'
|
||||
|
||||
conversion_options = {
|
||||
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'id': 'article'})]
|
||||
remove_tags_before = dict(name='div', attrs={'id': 'article'})
|
||||
remove_tags_after = dict(name='p', attrs={'id': 'byline'})
|
||||
remove_tags = [
|
||||
dict(name=['object', 'link', 'base']),
|
||||
dict(name='p', attrs={'class': 'print'}),
|
||||
dict(name='a', attrs={'class': 'addthis_button_compact'}),
|
||||
dict(name='script')
|
||||
]
|
||||
|
||||
feeds = [(u'Nyheter', u'http://www.arbetaren.se/rss/arbetaren.rss?rev=123')]
|
||||
feeds = [(u'Nyheter', u'https://www.arbetaren.se/feed')]
|
||||
|
Loading…
x
Reference in New Issue
Block a user