Hello there, 

I am new to outsystems and I am trying to fetch data from the source code of a website in order to always have the latest information in my application.

So my specific goal is to have the latest stock market numbers on my app (first only for DAX). Is there any way you would suggest me to do it? 


best regards


Patrick 

Hi Patrick,

I didn't try it, but take a look into this component.

Hi again,

After a better search, I think that something related to web sockets it's more suitable. 

Please check this search.

Hi!

thank you very much, im going to check it out

Hi Patrick. From what I understand, you want to do web scraping - write a simple bot that opens a web site and extracts information from that website.

If that's the case, this search might be more suitable: https://www.outsystems.com/forge/list?q=web%20scraping

Hi leonardo, 

that's exactly the case! The description writes that it is only for Outsystems 10 so i have to downgrade version 11 to 10 in order to use this extension?

And i can only use it for web applications?

No, when you install it will be upgraded to version 11 automatically. If you have any issues, let me know.

Sounds good, can I only use it for web apps or also for mobile?

And is there a little documentation how to use this extension? I'm completely new and don't really know how to use an extension in my own app.

Thank you  

It only works in web apps, or in server actions of mobile.

There's not much documentation unfortunately, only the description of each action exposed by the component. You should start by adding a reference to the actions from the textprocessing module, by using Manage Dependencies.

ahhh okay, so i can take usage of the functions. Is it possible to click a button on my mobile app, trigger a server action and with the given functions I can somehow scrap the information I need?

Yes, you can use those actions inside any server action.

okay i understand. As you mentioned before it is only available on server actions on mobile apps.

When I place a normal button and connect it with a server action I get an error 

"Invalid Client Action
'ParseHtmlFromUrl' action cannot be used in the 'InfosOnClick2' action. Server Actions with 'Object' type parameters are not allowed in Client Actions".


Do you know an alternative to pass this problem?

Solution

You can't drag the APIs directly inside a client action (Infos2OnClick2 looks like a client-side screen action). You need to create a server action and use the APIs inside the server action.

Create a new server action, and inside that new server action execute your web scraping. If you want to return some information to the mobile app, you'll need to process that information in the server action and output it as a structure or a list. Then you can drag this server action into your Infos2OnClick2.

Solution

Thanks that helped me a lot!