How can I use the python HTMLParser library to extract data from a specific div tag?

前端 未结 4 2252
名媛妹妹
名媛妹妹 2020-11-27 13:43

I am trying to get a value out of a HTML page using the python HTMLParser library. The value I want to get hold of is within this html element:

...
4条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 14:05

    This works perfectly:

    print (soup.find('the tag').text)
    

提交回复
热议问题