Red de conocimiento informático - Problemas con los teléfonos móviles - python pycharm rastreo lt;pgt; en lt;emgt;?

python pycharm rastreo lt;pgt; en lt;emgt;?

html=topic.xpath('/html/body/div/div/div/div/p/text()')

Cambiar a

html=topic.xpath(' /html/body/div/div/div/div/p') .txt

Pruébelo

p/text() solo puede capturar archivos de texto sin formato con etiqueta p, ignorar la etiqueta em