View Single Post
Old 10-17-2012, 08:25 AM   #1
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 143
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
InformationWeek Recipe almost done...need help

Hi,

I decided to redo the InformationWeek recipe to update it and make it better suit my needs and I am almost done and it is already very handy.

But there is one problem I can not solve and need help to tackle it. Pls. be gentle, I don't know about programming and are just copying tidbits together a fiddle around until they work (or don't).

I am grabbing the RSS pages such as:

http://feeds.informationweek.com/inf...d_IWK_Software

The entries on this page need to be dereferenced (or something like that), so I do this

Code:
def print_version(self, url):
        return self.browser.open_novisit(url).geturl().replace('?cid=RSSfeed.*$', '') + '?printer_friendly=this-page'
which also uses a replacement to turn the original URL

http://www.informationweek.com/softw...d_IWK_software

into its printer friendly version

http://www.informationweek.com/softw...ndly=this-page

This works just fine most of the time. But in this example there is a side-box ("More Software Insights") on the page (before I print-format it) that shows up in the output of the recipe, even though it does not show up on the screen of the browser of the printer-friendly version and should therefore not be in the output either.

I am totally confused by this. Can someone explain what is happening and how I can get rid of this disturbing element?

Any help much appreciated!

Thanxx, Mixx
Mixx is offline   Reply With Quote