NEW: html2text dumps html as plaintext

This commit is contained in:
xpk 2023-12-04 15:09:02 +08:00
parent 6ea0be7698
commit 41de1c9b5b
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

6
py/html2text.py Normal file
View File

@ -0,0 +1,6 @@
from urllib import request
import html2text
url = 'https://duckduckgo.com'
text = request.urlopen(url).read().decode('utf8')
print(html2text.html2text(text))