weblyzard / inscriptis

A python based HTML to text conversion library, command line client and Web service.
Apache License 2.0
266 stars 28 forks source link

Custom annotation metadata based on element attribute #88

Open probavee opened 2 weeks ago

probavee commented 2 weeks ago

Hi, thank you for this library ! Is there a way to add whatever we want to the metadata in annotations ? For instance i'd like to annotate HTML like so:

[(0, 10, {"name":"a", "href":"http://example.com"}),
(10, 11, {"name":"img", "alt":"my alternative text"}), ... ]

However, I haven’t yet found a straightforward way to achieve this with the current functionality of the library. Do you have any insights or suggestions on this?

caineblood commented 2 weeks ago

The above comment asking you to download a file is malware to steal your account; do not under any circumstances download or run it. The post needs to be removed. If you have attempted to run it please have your system cleaned and your account secured immediately.