html = rep.textsoup = BeautifulSoup(html, "lxml")text = soup.find_all("script", type="text/javascript")[2].string
想听最后一行代码的详细解释,特别是[2].string在干吗?
求解释一下
就是 获取 soup.find_all("script", type="text/javascript") 返回的结果, 取第3个元素的文本。