I have put together a basic recipe to download new articles (or abstracts, if you aren't logged in) from Science Direct. Could someone help improve it? Currently, it does not bold or otherwise highlight the article titles, there seems to be a left indent that I'd prefer to get rid of, and it is downloading the versions of articles with small, grainy images instead of full-sized images. (To get larger images, I need to append "&artImgPref=F" to the URL, but my attempt below doesn't work).
Quote:
Originally Posted by code
class AdvancedUserRecipe1279948676(BasicNewsRecipe):
title = u'Science Direct'
__author__ = u'Barbara Robson'
description = u'New journal articles from my favourite journals on Science Direct. Edit to choose your own favourites. Full text if you have an institutional login; abstracts otherwise.'
oldest_article = 8
max_articles_per_feed = 40
no_stylesheets = True
feeds = [(u'Environmental Modelling and Software', u'http://rss.sciencedirect.com/publication/science/6063'),
(u'Ecological Modelling',u'http://rss.sciencedirect.com/publication/science/5934'),
(u'Estuarine, Coastal and Shelf Science',u'http://rss.sciencedirect.com/publication/science/6776'),
(u'Water Research',u'http://rss.sciencedirect.com/publication/science/5831')]
def full_images(self, url):
return url.append("&artImgPref=F")
remove_tags_before = dict(id='articleContent')
remove_tags_after = [dict(attrs={'class':'SDTxtSmallBold'})]
remove_tags = [dict(attrs={'class':'SDTxtSmallBold'})]
remove_attributes = ['width','height']
|
Thanks for any help!