def get(ID): varl.set('have gotten %s books' %ID) html = lib.urllib.urlopen('https://read.douban.com/ebooks/tag/%E5%8E%86%E5%8F%B2/?cat=book&sort=top&start=20').read() #print html reg = r'<span class="price-tag ">(.?)</span>.*?''read.douban.com\')">(.?)</a>' return re.findall(reg,html)
这一部分