,response,re.S)img &#61; re.findall(&#39;dd>.*?&#39;,response,re.S)score &#61; re.findall(&#39;score.*?integer">(.*?)<.*?fraction">(.*?)<&#39;,response,re.S)name,star,date,img,score &#61; list(name),list(star),list(date),list(img),list(score)#star和score需要处理一下stars &#61; []for i in star:stars.append(i.split())scores &#61; []for i,j in score:scores.append(i&#43;j)for i in range(10):all_dict[index[i]] &#61; {&#39;index&#39;:index[i],&#39;name&#39;:name[i],&#39;star&#39;:stars[i],&#39;img&#39;:img[i],&#39;date&#39;:date[i]}
,response,re.S)img &#61; re.findall(&#39;dd>.*?&#39;,response,re.S)score &#61; re.findall(&#39;score.*?integer">(.*?)<.*?fraction">(.*?)<&#39;,response,re.S)name,star,date,img,score &#61; list(name),list(star),list(date),list(img),list(score)#star和score需要处理一下stars &#61; []for i in star:stars.append(i.split())scores &#61; []for i,j in score:scores.append(i&#43;j)for i in range(10):all_dict[index[i]] &#61; {&#39;index&#39;:index[i],&#39;name&#39;:name[i],&#39;star&#39;:stars[i],&#39;img&#39;:img[i],&#39;date&#39;:date[i]}all_dict &#61; {} for i in urls:get_onepage(i)for i in all_dict.items():print(i)with open(&#39;maoyan.json&#39;,&#39;w&#39;,encoding&#61;&#39;utf8&#39;) as f:json.dump(all_dict,f)with open(&#39;maoyan.json&#39;,&#39;r&#39;,encoding&#61;&#39;utf8&#39;) as f:print(json.load(f))