#淘宝商品的商品价格:

regjg=re.compile(r'"view_price":"[\d\.]*"')

jg=regjg.findall(html)

#淘宝商品的商品名称:

regmc=re.compile(r'"raw_title":".*?"')

mc=regmc.findall(html)

#淘宝商品的店铺名称:

regdpmc=re.compile(r'"nick":".*?"')

dpmc=regdpmc.findall(html)

lista=[]

for i in range(len(jg)):

    price=eval(jg[i].split(":")[1])

    title=eval(mc[i].split(":")[1])

    lista.append([price,title])


评论
 
© 软件交流 | Powered by LOFTER