Thread: print#
View Single Post
Old 11-27-2010, 02:09 PM   #10
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by mufc View Post
But Men's Fitness would not
Spoiler:
Code:
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"
The Recipe above here won't run preprocess_html as it has incorrect indents.
Quote:
I want to get the print option correct.
You need to debug with print statements to find out why.
Starson17 is offline   Reply With Quote