2

I used until today my own HTML parser to extract stuff (link, images, meta, etc) from a webpage. Not the fastest but it worked. However it is difficult to keep it up to date with the moving HTML standard. For example besides "src" now supports also "srcset".

I would like to switch to a 3rd party library but all the good ones seem to be based on Microsoft's IHTMLDocument. This might be a problem in the future if I decide to build for Mac/Linux.

There is any GOOD Delphi library that can parse HTML while being platform-independent? http://htmlp.sourceforge.net seems to be nice, but there is simply no documentation for it. And it is still beta.

1 Answer 1

1

I can't answer your question directly because I haven't used Delphi for many years. However, I have considerable recent experience in parsing a variety of types of sites with various Python libraries. They are very good, well documented and fairly easy to use. This might not interest you except that, as you probably know, there is also Python4Delphi. Thus one strategy would be to develop the necessary parsing code in Python and then perhaps to exchange input for results using this product.

2
  • I will definitively NOT outsource the task to Python BUT thanks for letting me know about that Python4Delphi library. It might be handy one day. +1
    – IceCold
    Commented Nov 8, 2017 at 18:12
  • OK but you don't know what you're missing. :)
    – Bill Bell
    Commented Nov 8, 2017 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.