import requests
from lxml import etree
import pymysql
url='https://car.autohome.com.cn/2sc/nanning/aodi/a0_0msdgscncgpi1ltocspex/'
r=req
b=etree.HTML(r)
c=b.xpath('/html/body/div[2]/div/div[2]/div[4]/div/
for i in c:
cm=i.xpath('./div[2]/a/text()')
cml=cm[0] if cm else " nothing "
print(cml)