View Single Post
Old 06-03-2010, 04:54 PM   #2038
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 kidtwisted View Post
A question about preprocess_html part.
What does the "3" represent in this line?
Code:
self.append_page(soup, soup.body, 3)
It's "position" in the insert here: appendtag.insert(position,texttag)

It's saying to insert the text at the 3rd tag position. You can reference locations in Soup by labels (most common) or by tag position number (as above).

Quote:
Thanks for your help, just needs a little more clean up.
I need to apply this to the pcper.com site now , it's a little more tricky so it might need a different approach.

Thanks again.
You're welcome and good luck. I prefer to help others figure out how to do it than to just write it. If you need help with pcper, let us know, and be sure to post your final results here so Kovid can add it to the code for use by others.
Starson17 is offline