Thread: maya recipe
View Single Post
Old 10-24-2010, 02:28 PM   #35
marbs
Zealot
marbs began at the beginning.
 
Posts: 122
Karma: 10
Join Date: Jul 2010
Device: nook
i read a few examples and i think i can write the function it self.
i am not sure i know how to use it. or how to call on it.

i got this far:
Spoiler:
Code:
#    def append_page(self, soup, appendtag, position):
 #       rec_index =     rec_index +'1'
   #     stop = soup.find('td',attrs={'height':'19'})
  #      reportnum = stop.findnext('b')
  #      num = self.tag_to_string(reportnum)
  #      articles_left =num - '30'
  #      if (articles_left <'0') :
    #       request =  = urllib.urlencode([('rsSearchRes_pgNo',rec_index)])
    #        nexturl = br.open(url, request)
##           soup2 = self.index_to_soup(nexturl)
#           texttag = soup2.find('div', attrs={'class':'bodytext'})
#           for it in texttag.findAll(style=True):
#               del it['style']
#           newpos = len(texttag.contents)
#           self.append_page(soup2,texttag,newpos)
#           texttag.extract()
#           appendtag.insert(position,texttag)


but now i am lost. i dont know where i am going with this. can someone focus me again?

Last edited by marbs; 10-24-2010 at 04:12 PM.
marbs is offline   Reply With Quote