qiubaiadult.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:Python 作者: Guzi219 项目源码 文件源码
def GetTotalPage(self, html):
        # create the BeautifulSoup
        some_soup = BeautifulSoup(html)
        #get the page div
        ele_a = some_soup.find('div', attrs={'class': 'page'})
        #get the last div>a text='??'
        last_a = ele_a.findAll('a')[-1]
        #substr 0:.html
        pagenum = last_a.get('href')[:-5]
        print 'pagenum :', pagenum
        # print type(last_a)

        self.SaveTotalPageToFile(pagenum)

    # store the max page number to totalpage.ini
    #new_page_num: new max page num
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号