= requests.get(url, headers=headers).text
# print(raw_html)
selector = etree.HTML(raw_html...html:
return html
except Exception as e:
print('.....')...(raw_html)
try:
# 房子名称
hose_title = selector.xpath('//dd[@class="dd-item title"]/...`,`房子价格`,`房子单价`,`房子类型`,`房子地址`,`房子大小`)values(%s,%s,%s,%s,%s,%s)"
cursor.execute(sql, (...tb.add_column('房子类型',house_type)
tb.add_column('房子地址',house_site)
tb.add_column('房子大小