Welcome! Log In Create A New Profile

Advanced

[WD27] - Get the Text from a Web Page

Posted by JP 
JP
[WD27] - Get the Text from a Web Page
February 01, 2023 11:01AM
WinDev 27

Is there a function to retrieve the text from a web page? In other words, I have the URL of a web page and I want to extract the main text from that page. Is that possible?

Thanks
Peter M
Re: [WD27] - Get the Text from a Web Page
February 01, 2023 01:00PM
URLExtractPath is your friend

Peter
JP
Re: [WD27] - Get the Text from a Web Page
February 01, 2023 02:32PM
Peter,

I dont see how URLExtractPath can retrieve for me the text of a web page? I'm looking to get the main body text of a web page.



Edited 1 time(s). Last edit at 02/01/2023 02:36PM by JP.
pao
Re: [WD27] - Get the Text from a Web Page
February 01, 2023 04:13PM
Did you try with httpResponse?
[doc.windev.com]

Regards

Paulo Oliveira
Re: [WD27] - Get the Text from a Web Page
February 01, 2023 04:50PM
Hi JP,
you can try this: [help.windev.com]
but you will must have v26 or newer

Regards
Steven Sitas
Argus
Re: [WD27] - Get the Text from a Web Page
February 02, 2023 07:35AM
httprequest to get to the page (see help)
once you have the whole html page, use htmltotext to retrieve the text
JP
Re: [WD27] - Get the Text from a Web Page
February 02, 2023 08:38AM
Thanks Everyone for your suggestions. I am busy testing and experimenting with them now smiling smiley
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: