12-01-2010, 12:29 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: none
|
How to replace a masthead
I am working on a recipe for the Poughkeepsie Journal and I would like to replace a masthead. I am a new at this and the method I tried is not working.
I've tried the following: 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')] 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') Thanks for any help Last edited by weebl; 12-01-2010 at 12:44 PM. |
12-01-2010, 01:44 PM | #2 | ||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Code:
return url.replace('http://www.poughkeepsiejournal.com/graphics/mastlogo.gif','http://www.poughkeepsiejournal.com/graphics/branding.gif') Code:
masthead_url = 'http://www.poughkeepsiejournal.com/graphics/branding.gif' Last edited by Starson17; 12-01-2010 at 01:49 PM. |
||
Advert | |
|
12-01-2010, 02:24 PM | #3 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: none
|
Quote:
|
|
12-01-2010, 02:56 PM | #4 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Yes, there's a better method - just eliminate the image you don't want with remove_tags. See here. |
|
12-01-2010, 08:55 PM | #5 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
I'm glad you got the help you were looking for. |
|
Advert | |
|
12-01-2010, 10:14 PM | #6 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: none
|
Quote:
|
|
12-02-2010, 09:01 AM | #7 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
It's OK. We were all beginners once, and there's no need to apologize. It's not immediately obvious how this place is organized, or what questions should go where. We always put a post in a thread that is misfiled, not because anyone wants to reprimand you, but because many others will see that post before they make a new post in the wrong place. It just helps to keep things organized and speeds up getting help when questions are posted in the right area.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Masthead image missing since 0.7.30 | siebert | Calibre | 1 | 11-27-2010 01:40 PM |
New Recipe features supporting Kindle masthead images | GRiker | Calibre | 6 | 08-27-2010 04:08 PM |
What will you replace your Kindle with. | pilotbob | Which one should I buy? | 33 | 03-16-2009 11:26 AM |
Replace battery ?? | singring | Fictionwise eBookwise | 1 | 02-11-2008 01:45 PM |
Replace Handstory | elveejay | Lounge | 3 | 06-04-2005 10:10 PM |