aaronsw / html2text

Convert HTML to Markdown-formatted text.
http://www.aaronsw.com/2002/html2text/
GNU General Public License v3.0
2.57k stars 410 forks source link

html2text.html2text() method is not callable #138

Open dhruv-scogo opened 1 week ago

dhruv-scogo commented 1 week ago

For my basic python code to text the library :

import html2text

output = html2text.html2text(
    '''<p>Hello, world.</p>'''
)
print(output)

I got the error shown below

  File "C:\Users\DHRUV PATEL\Desktop\Scraping\Markdown\demo.py", line 3, in <module>
    output = html2text.html2text(
             ^^^^^^^^^^^^^^^^^^^^
TypeError: 'module' object is not callable

Pls help me resolve the error