mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
New recipes: Golem, Netzpolitik by KG and Nu.nl by Rob Hankel
This commit is contained in:
parent
658bdb36cc
commit
a4082773ad
17
resources/recipes/golem_de.recipe
Normal file
17
resources/recipes/golem_de.recipe
Normal file
@ -0,0 +1,17 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1257093338(BasicNewsRecipe):
|
||||
title = u'Golem.de'
|
||||
language = 'de'
|
||||
__author__ = 'Kovid Goyal'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
|
||||
feeds = [(u'Golem.de', u'http://rss.golem.de/rss.php?feed=ATOM1.0')]
|
||||
|
||||
def print_version(self, url):
|
||||
murxb = url.rfind('/') + 1
|
||||
murxc = url[murxb :-5]
|
||||
murxa = 'http://www.golem.de/' + 'print.php?a=' + murxc
|
||||
return murxa
|
||||
|
14
resources/recipes/netzpolitik.recipe
Normal file
14
resources/recipes/netzpolitik.recipe
Normal file
@ -0,0 +1,14 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class BasicUserRecipe1257093186(BasicNewsRecipe):
|
||||
title = u'Netzpolitik'
|
||||
oldest_article = 14
|
||||
language = 'de'
|
||||
no_stylesheets = True
|
||||
__author__ = 'Kovid Goyal'
|
||||
max_articles_per_feed = 100
|
||||
remove_tags = [dict(id=['respond', 'ackt', 'nav', 'commentblock',
|
||||
'l_sidebar', 'r_sidebar']), dict(attrs={'class':['widgettitle',
|
||||
'bt-links', 'navigation']})]
|
||||
|
||||
feeds = [(u'Netzpolitik.org', u'http://www.netzpolitik.org/feed/')]
|
53
resources/recipes/nu.recipe
Normal file
53
resources/recipes/nu.recipe
Normal file
@ -0,0 +1,53 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Rob Hankel <from outerspace.com>'
|
||||
'''
|
||||
nu.nl
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Nu(BasicNewsRecipe):
|
||||
title = u'Nu.nl'
|
||||
__author__ = u'Rob Hankel'
|
||||
|
||||
publisher = 'nu.nl'
|
||||
description = u'Dutch News'
|
||||
category = 'news'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
encoding = 'utf-8'
|
||||
remove_javascript = True
|
||||
language = 'nl'
|
||||
|
||||
keep_only_tags = [dict(name='div' , attrs={'id':['leadarticle']})]
|
||||
|
||||
feeds = [(u'binnenland', u'http://www.nu.nl/feeds/rss/binnenland.rss'),
|
||||
(u'Algemeen nieuws', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Algemeen'),
|
||||
(u'Economie', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Economie'),
|
||||
(u'Internet', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Internet'),
|
||||
(u'Sport', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Sport'),
|
||||
(u'Achterklap', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Achterklap'),
|
||||
(u'Opmerkelijk', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Opmerkelijk'),
|
||||
(u'Muziek', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Muziek'),
|
||||
(u'DVD', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=DVD'),
|
||||
(u'Film', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Film'),
|
||||
(u'Boek', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Boek'),
|
||||
(u'Games', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Games'),
|
||||
(u'Columns', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Columns'),
|
||||
(u'Cartoon', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Cartoon'),
|
||||
(u'Lifehacking', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Lifehacking'),
|
||||
(u'Jurryt', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Jurryt'),
|
||||
(u'Formule 1', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Formule1'),
|
||||
(u'Plugged', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Plugged'),
|
||||
(u'Auto', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Auto'),
|
||||
(u'Wetenschap', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Wetenschap'),
|
||||
(u'Gezondheid', u'http://www.nu.nl/deeplink_rss2/index.jsp?r=Gezondheid'),
|
||||
(u'Dagelijkse tv-tips', u'http://www.nu.nl/tvgids/rss/tips'),
|
||||
(u'Podcast Algemeen nieuws', u'http://www.nu.nl/podcast.php')]
|
||||
|
||||
|
||||
def get_article_url(self, article):
|
||||
return article.get('guid', None)
|
||||
|
@ -126,7 +126,7 @@ class UserProfiles(ResizableDialog, Ui_Dialog):
|
||||
if not title or not src:
|
||||
error_dialog(self, _('No recipe selected'), _('No recipe selected')).exec_()
|
||||
return
|
||||
pt = PersistentTemporaryFile(suffix='.py')
|
||||
pt = PersistentTemporaryFile(suffix='.recipe')
|
||||
pt.write(src.encode('utf-8'))
|
||||
pt.close()
|
||||
body = _('The attached file: %s is a recipe to download %s.')%(os.path.basename(pt.name), title)
|
||||
|
Loading…
x
Reference in New Issue
Block a user