Thread: print#
View Single Post
Old 11-26-2010, 03:26 PM   #7
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
I had tried something similar without much success. This does not seem to work either.
http://www.mensfitness.com/rss_global/
This pages leads to main rss feed then when I link to an article it gives me print option but the code you gave me did not work unless I have done something wrong.

class AdvancedUserRecipe1289709253(BasicNewsRecipe):
title = u'test'
oldest_article = 7
max_articles_per_feed = 100
use_embedded_content = False
no_stylesheets = True

remove_javascript = True
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'






feeds = (u'News', u'http://www.mensfitness.com/rss_global/')



def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup

def print_version(self, url):
return url + "?print=1"
mufc is offline   Reply With Quote