mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
New recipe for The Nursing Times by Darko Miletic
This commit is contained in:
parent
53f8ba24da
commit
5505ad7a53
BIN
resources/images/news/nursingtimes.png
Normal file
BIN
resources/images/news/nursingtimes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 788 B |
67
resources/recipes/nursingtimes.recipe
Normal file
67
resources/recipes/nursingtimes.recipe
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.nursingtimes.net
|
||||||
|
'''
|
||||||
|
|
||||||
|
import urllib
|
||||||
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
|
|
||||||
|
class NursingTimes(BasicNewsRecipe):
|
||||||
|
title = 'Nursing Times'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Nursing practice, NHS and health care news'
|
||||||
|
oldest_article = 8
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
publisher = 'emap'
|
||||||
|
category = 'news, health, nursing, UK'
|
||||||
|
language = 'en-UK'
|
||||||
|
needs_subscription = True
|
||||||
|
LOGIN = 'http://www.nursingtimes.net/sign-in'
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comments' : description
|
||||||
|
,'tags' : category
|
||||||
|
,'language' : language
|
||||||
|
,'publisher' : publisher
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_browser(self):
|
||||||
|
br = BasicNewsRecipe.get_browser()
|
||||||
|
br.open(self.LOGIN)
|
||||||
|
if self.username is not None and self.password is not None:
|
||||||
|
data = urllib.urlencode({ 'campaigncode' :'0'
|
||||||
|
,'referrer' :''
|
||||||
|
,'security_text':''
|
||||||
|
,'SIemail' :self.username
|
||||||
|
,'passWord' :self.password
|
||||||
|
,'LoginButton.x':'27'
|
||||||
|
,'LoginButton.y':'13'
|
||||||
|
})
|
||||||
|
br.open(self.LOGIN,data)
|
||||||
|
return br
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'storytext'})]
|
||||||
|
remove_tags = [
|
||||||
|
dict(name=['object','link','script','iframe'])
|
||||||
|
,dict(name='div',attrs={'id':'comments_form'})
|
||||||
|
]
|
||||||
|
remove_tags_after = dict(name='div',attrs={'id':'comments_form'})
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Breaking News', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=1')
|
||||||
|
,(u'Practice', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=512')
|
||||||
|
,(u'Behind the headlines', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=468')
|
||||||
|
,(u'Analysis', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=62')
|
||||||
|
,(u'Acute care news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=5')
|
||||||
|
,(u'Primary vare news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=231')
|
||||||
|
,(u'Mental Health news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=27')
|
||||||
|
,(u'Management news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=32')
|
||||||
|
,(u"Older people's nursing news", u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=181')
|
||||||
|
,(u'Respiratory news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=177')
|
||||||
|
,(u'Wound care news', u'http://www.nursingtimes.net/XmlServers/navsectionRSS.aspx?navsectioncode=182')
|
||||||
|
]
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user