beautiful soup just get the value inside the tag

后端 未结 5 1394
名媛妹妹
名媛妹妹 2020-12-06 05:29

The following command:

volume = soup.findAll(\"span\", {\"id\": \"volume\"})[0]

gives:



        
5条回答
  •  Happy的楠姐
    2020-12-06 05:42

    Extract the string from the element:

    volume = soup.findAll("span", {"id": "volume"})[0].string
    

提交回复
热议问题