import requests
from bs4 import BeautifulSoup
import re
import json
req=requests.get(url,headers=headers)
soup=BeautifulSoup(req.text,'lxml')
r=soup.select('script:contains("window.__SEARCH_RESULT__")')[0]
res = re.findall('window.__SEARCH_RESULT__ = (.*);',r.string)
data=json.loads(res[0])
print(data)
print(type(data))#转换成了字典,从中解析中所需数据。