Re: parsing HTML
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wyTdFC1_uK3pn44oY9bKbAixnfbLnCf2FmEjiA+f8BcjA@mail.gmail.com> |
2013/7/10 Josef Frydl <[email protected]> > Hi, I want to extract URLs from the result of google search query. > Curently I do it directly from the response, using DCG. However it is > unnecessary complicated. Converting it to DOM is not better. > Is there any way to transfer the HTML to plain text, that is to make it > look like what we see in browser? > Hi Josef In browsers we see the rendering of the DOM. It's surely much easier to interpret the outcome of load_html than the raw HTTP response. And you can trust the result, because from Google, hopefully, you will get well formed HTML... Did you tried library(url) <http://www.swi-prolog.org/pldoc/man?section=url>? Thanks Josef Frydl > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > -------------- next part -------------- HTML attachment scrubbed and removed