|
|
#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 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 02:49 PM. |
||
|
|
|
|
|
#3 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Dec 2010
Device: none
|
Quote:
|
|
|
|
|
|
|
#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. |
|
|
|
|
|
|
#5 | |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
I'm glad you got the help you were looking for. |
|
|
|
|
|
|
#6 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Dec 2010
Device: none
|
Quote:
|
|
|
|
|
|
|
#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 02:40 PM |
| New Recipe features supporting Kindle masthead images | GRiker | Calibre | 6 | 08-27-2010 05:08 PM |
| What will you replace your Kindle with. | pilotbob | Which one should I buy? | 33 | 03-16-2009 12:26 PM |
| Replace battery ?? | singring | Fictionwise eBookwise | 1 | 02-11-2008 02:45 PM |
| Replace Handstory | elveejay | Lounge | 3 | 06-04-2005 11:10 PM |