Я пытаюсь очистить текст от этого div
<div class="col-lg-6">
<h3 class="c-panel__section-heading">Reply</h3>
<div class="textAreaContainer closed">
<div contenteditable="true" class="customTextArea" id="Message" name="Message">
<p>Dear Customer, </p>
<p>the <span style="background-color: rgb(238, 238, 238);">MFDeviceMT.dll is a Matrox driver related dll, if you're not using a MATROX card on the server where you encountered the issue you can temporarily ignore it.</span></p>
<p><span style="background-color: rgb(238, 238, 238);">We have however forwarder the problem to our developing team, thank you for the feedback.</span></p>
<p><span style="background-color: rgb(238, 238, 238);">Best Regards.</span></p>
-------------- -------------- ----------- Email send to: martin.bonato@brasvideo.com;b2w.shoptime@brasvideo.com Email send cc: supporto@etere.com
</div>
</div>
</div>
Но теперь сайт внедрил тег
, и я не могу очистить весь текст, используя эту команду
sel.xpath('//*[@id="Message"]/text()').extract()[-1]
и он возвращает
Весь текст в последнем теге p
Так как я могу очистить весь текст в div с помощью тега p