View Single Post
Old 05-20-2010, 02:39 AM   #1955
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by DesktopGeneral View Post
I've been trying to get this recipe to work for the newspaper Roll Call. The only thing that is not working is the print version return. I'm still getting the full version. Any help would be appreciated. I don't know python, but I pieced this together form other recipes.

The recipe is below

class AdvancedUserRecipe1273837220(BasicNewsRecipe):
title = u'Roll Call'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
needs_subscription = True

feeds = [(u'Roll Call', u'http://www.rollcall.com/issues/index.xml')]

def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('http://www.rollcall.com/login')
br.select_form(name='login_form')
br['login_id'] = self.username
br['login_pwd'] = self.password
br.submit('submit')
return br

def print_version(self, url):
return url + '?type=printer_friendly'
try this:
Code:
def print_version(self, url):
       link =url + '?type=printer_friendly'
       print link
and look yourself if something wrong.
gambarini is offline