html2text icon indicating copy to clipboard operation
html2text copied to clipboard

The picture url with "-" is converted to "-\n"

Open myifeng opened this issue 5 years ago • 1 comments

  • Version by 2020.1.16

>>> print(html2text.html2text('<img src="http://n.sinaimg.cn/tech/transform/59/w309h550/20180404/k2nb-fysuuya3242244.png">'))

# ![](http://n.sinaimg.cn/tech/transform/59/w309h550/20180404/k2nb-
fysuuya3242244.png)

expect: ![](http://n.sinaimg.cn/tech/transform/59/w309h550/20180404/k2nb-fysuuya3242244.png)

  • Python version 3.7.1

myifeng avatar Sep 23 '20 02:09 myifeng

I have the same issue with Python 3.9 any better solution?

I am currently doing

htmlText = htmlText.replace('-\n','-')

locphan57910 avatar Nov 29 '20 07:11 locphan57910