Beautiful Soup and extracting a div and its contents by ID

后端 未结 13 1543
死守一世寂寞
死守一世寂寞 2020-11-30 19:54
soup.find(\"tagName\", { \"id\" : \"articlebody\" })

Why does this NOT return the

...
tags
13条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 20:20

    Most probably because of the default beautifulsoup parser has problem. Change a different parser, like 'lxml' and try again.

提交回复
热议问题