this is another way, you can try it
BEAUTIFUL SOUP DOCUMENTAION
http://www.crummy.com/software/Beaut...%20**kwargs%29
Attachment 90791
Code:
def append_page(self, soup, appendtag, position):
pager = soup.find('div', attrs={'class':'text-c'})
if pager:
pagenum = soup.find('span')
nextpage = pagenum.findNextSiblings('a', attrs={'class':'a1'})
if nextpage:
nexturl = nextpage['href']
soup2 = self.index_to_soup(nexturl)
texttag = soup2.find('div', attrs={'class':'content_left_5'})
for it in texttag.findAll(style=True):
del it['style']
newpos = len(texttag.contents)
self.append_page(soup2,texttag,newpos)
texttag.extract()
pager.extract()
appendtag.insert(position,texttag)
i don‘t know whether it works,please tell me.