Quantcast
Channel: User Christoffer - Stack Overflow
Viewing all articles
Browse latest Browse all 45

Answer by Christoffer for Python html2text adds random \n

$
0
0

In the latest version of html2text do this:

import html2text
h = html2text.HTML2Text()
h.body_width = 0
note = h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")

This removes the word wrapping that html2text otherwise does


Viewing all articles
Browse latest Browse all 45

Trending Articles