Every story I download from the website has a .gif file as a banner, I would like to replace it with another. I have the complete url for both.
Here is my recipe that does not work manner but it didn't work.
Code:
class AdvancedUserRecipe1291143841(BasicNewsRecipe):
title = u'Poughkeepsipe Journal'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
timefmt = ' [%a, %d %b, %Y]'
feeds = [(u'Local News', u'http://poughkeepsiejournal.com/apps/pbcs.dll/oversikt?Category=RSS01&mime=xml'), (u'Local Business', u'http://poughkeepsiejournal.com/apps/pbcs.dll/oversikt?Category=RSS02&mime=xml'), (u'Local Sports', u'http://poughkeepsiejournal.com/apps/pbcs.dll/oversikt?Category=RSS03&mime=xml'), (u'Life', u'http://poughkeepsiejournal.com/apps/pbcs.dll/oversikt?Category=RSS04&mime=xml')]
masthead_url = 'http://www.poughkeepsiejournal.com/graphics/branding.gif'
def print_version(self, url):
return url.replace('http://www.poughkeepsiejournal.com', 'http://www.poughkeepsiejournal.com/print')
return url.replace('http://www.poughkeepsiejournal.com/graphics/mastlogo.gif','http://www.poughkeepsiejournal.com/graphics/branding.gif')