How to get info from Site

My friend needs some help.

Can i somehow get data from site ?

For example i wonna get this data (Online: 217 / 1000) , to be in label in my app

Site: https://www.zara-rpg.com/

1 Like

let me check this, i will check and arrange blocks if i get this

1 Like

this website is protected and when we run web to get html, it didnt get that values in mobile, because its protected

1 Like

So not possible ?

lets see, maybe some other users have any solution for that

Ok thanks anyway ! :slight_smile:

1 Like

Have you tried running document.getElementsByClassName() with the evaluate JS block of the Web Viewer?

3 Likes

I don’t know how ? xD

Can you show me

He says it, everything…

What string you should put with the block:

The block:

The component:

2 Likes

I never used this

Please help

2 Likes

try to use the After JS Evaluated event to get the result
see also this snippet


Taifun

3 Likes

Thanks
but still doesn’t work ?

document.getElementsByClassName returns an HTML collection of all elements with that class name. As you can see in the illustration, there are other elements with the same class (maybe more that are not seen in the screenshot).

You can iterate over all the elements and check their innerHTML and see if it starts with “Online:”, or you can select the exact element you want using document.querySelector

Something like document.querySelector('.stats-box.block-holder .stat-lines')[0].innerHTML should work for you.

PS: I just checked the website you linked in your first post, and it looks like the server is down, so the stat-list element doesn’t exist in the DOM. You might want to add some extra JS to handle this edge case.

this website is protected i have checked for first it checks browser and after 5 seconds it shows website, so if we run get html, we get nothing in html with all these data, only just some errors, and some texts that website is protected by some cloud company and all, on computer after checking browser it shows html for online value but in app, it can check valid browser so its shows only errors in Html.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.