mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Updated NME
This commit is contained in:
parent
343c0a8d1b
commit
7cd23bbeaa
@ -4,7 +4,7 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
|||||||
title = u'New Musical Express Magazine'
|
title = u'New Musical Express Magazine'
|
||||||
description = 'Author D.Asbury. UK Rock & Pop Mag. '
|
description = 'Author D.Asbury. UK Rock & Pop Mag. '
|
||||||
__author__ = 'Dave Asbury'
|
__author__ = 'Dave Asbury'
|
||||||
# last updated 9/6/12
|
# last updated 7/10/12
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
@ -14,26 +14,24 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
|||||||
language = 'en_GB'
|
language = 'en_GB'
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
soup = self.index_to_soup('http://www.magazinesdirect.com/categories/mens/tv-and-music/')
|
soup = self.index_to_soup('http://www.nme.com/component/subscribe')
|
||||||
cov = soup.find(attrs={'title' : 'NME magazine subscriptions'})
|
cov = soup.find(attrs={'id' : 'magazine_cover'})
|
||||||
cov2 = 'http://www.magazinesdirect.com'+cov['src']
|
cov2 = str(cov['src'])
|
||||||
print '***cov = ',cov2,' ***'
|
# print '**** Cov url =*', cover_url,'***'
|
||||||
|
#print '**** Cov url =*','http://www.magazinesdirect.com/article_images/articledir_3138/1569221/1_largelisting.jpg','***'
|
||||||
|
|
||||||
cover_url = str(cov2)
|
|
||||||
# print '**** Cov url =*', cover_url,'***'
|
|
||||||
#print '**** Cov url =*','http://www.magazinesdirect.com/article_images/articledir_3138/1569221/1_largelisting.jpg','***'
|
|
||||||
|
|
||||||
br = browser()
|
br = browser()
|
||||||
br.set_handle_redirect(False)
|
br.set_handle_redirect(False)
|
||||||
try:
|
try:
|
||||||
br.open_novisit(cov2)
|
br.open_novisit(cov2)
|
||||||
cover_url = str(cov2)
|
cover_url = str(cov2)
|
||||||
except:
|
except:
|
||||||
cover_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg'
|
cover_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg'
|
||||||
return cover_url
|
return cover_url
|
||||||
|
|
||||||
masthead_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg'
|
masthead_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg'
|
||||||
|
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict( attrs={'class':'clear_icons'}),
|
dict( attrs={'class':'clear_icons'}),
|
||||||
dict( attrs={'class':'share_links'}),
|
dict( attrs={'class':'share_links'}),
|
||||||
@ -61,9 +59,15 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
|||||||
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'NME News', u'http://feeds2.feedburner.com/nmecom/rss/newsxml'),
|
(u'NME News', u'http://feeds.feedburner.com/nmecom/rss/newsxml?format=xml'),
|
||||||
#(u'Reviews', u'http://feeds2.feedburner.com/nme/SdML'),
|
#(u'Reviews', u'http://feeds2.feedburner.com/nme/SdML'),
|
||||||
(u'Reviews',u'http://feed43.com/4138608576351646.xml'),
|
(u'Reviews',u'http://feed43.com/1817687144061333.xml'),
|
||||||
(u'Bloggs',u'http://feed43.com/3326754333186048.xml'),
|
(u'Bloggs',u'http://feed43.com/3326754333186048.xml'),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
extra_css = '''
|
||||||
|
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
||||||
|
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||||
|
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||||
|
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||||
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user