Web API get body content from a webpage

hello i am trying to get some text from a web page (Body_content) does anyone know how to do this through the web api? thank you

1 Like

Can u please provide the webpage sample?
And will it be same forever? (like wikipedia info of a particular) or change every minute? (like ISS live location)

Thanks!

1 Like

Yes it would be wikipedia and change the search depending on what the user is looking for!

Check it (only suitable for static pages)

https://x.thunkable.com/projects/5d3da1fb9288facdaf6ec704/project/properties/designer/

1 Like

thanks for the tip but i just wanted to get the text and send it to a label

My example does not allow to do this?

2 Likes

the example shows the full page but I only want the introduction text

1 Like

Did you click on the “get title” button?

I showed the full page so that you can see the information on it and what happens when you click on the Get title button.

1 Like

I am sorry I did not realize this function. but how do i get the selected text in the image?

You need to find the HTML tags in which the text is in the source structure of the document and get it. See how this is done in my example.

Unfortunately now I can not make such a code for you.

1 Like

when you can make a scheme and I’ve tried to change the tags and nothing happens. maybe something is wrong with me

hello I got the desired text but. but along comes the html code. Is there any way to clear the text?

1 Like

Try replacing all tags with null by

Replace all text in (#1) text_to_replace (#2) with (#ev3

Thanks! :smile:

@kartik_old sorry but I didn’t understand how to do it


Perhaps you can try this. I’m not 100% sure if this works, but it’s worth a try.

the same resulte

May I see your blocks?

@renren66 https://x.thunkable.com/copy/0b702ba2b7f65a5942d80a6cf44abc73

Check it

https://x.thunkable.com/projects/5d42d786b147448022b4d5eb/project/properties/designer/

2 Likes

thank you for the moment works as i want. thank you so much for wasting time building all these blocks! You were a great help like everyone else who helped! Now I just have to try if it works the same if the link is different. thank you very much

1 Like