Android Question Nedd help getting data from a website

Past11

Member
Hi guys merry christmas.
I need your help on where to get started with this, i need to extract some data, from a website, they appear to be in a table or something like that, i have successfully used REGEX101 previously for some data, but these data are not available in the html of the webpage, can someone help med getting started on what method to use maybe a small example on how to do something similar, and how to find the required "name" or "tags" needded to extract the data ? it would be greatly appreciated, i attached the link for the website, it is the covid-19 data i need to extract and a image of what it looks like on the web, thak you so much for your help guys, and a merry christmas to you all :)

website : https://nyheder.tv2.dk/samfund/dagens-coronatal-overblik-over-smittede-indlagte-og-doede

Image of needed data.
 

Attachments

  • datawanted.PNG
    datawanted.PNG
    39.9 KB · Views: 162

Erel

B4X founder
Staff member
Licensed User
Longtime User
Check the html source and you will see that this information is not there. It comes from other requests initiated by the JavaScript code of that page.
You can use the browser development tools to find those requests.

Here is one for example: https://static.editorialdev.tv2a.dk/assets/2020/covid19/communeData.json

Note that the data might be copyrighted.
 
Upvote 0

Past11

Member
Check the html source and you will see that this information is not there. It comes from other requests initiated by the JavaScript code of that page.
You can use the browser development tools to find those requests.

Here is one for example: https://static.editorialdev.tv2a.dk/assets/2020/covid19/communeData.json

Note that the data might be copyrighted.
Thank you very much erel i will take a look at that i just didnt know where to Begin ord what to look for ? thank you and mery Christmas to you All ?
 
Upvote 0

Past11

Member
Hello again Erel.
i have been dealing with this since your reply yesterday can you shortly tell how you found that .json link ? i have been through everything i think in google chromes developer, and firefox also but all i can find are .css and .js files ? can you please point me in a direction ? thank you very much :)
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
you can see the json links if you use chrome's (or firefox's) developer's tab (dk.png) you just download them with okhttputils2 (dk.png). you'll have to parse the json to find the elements you're interested in, but once you know which files are the ones you need, you don't need the website (until somebody there changes the format and the links). there are 6 such files for that url (i only show the first 2).
 

Attachments

  • dk.png
    dk.png
    54.9 KB · Views: 172
  • dk2.png
    dk2.png
    26.2 KB · Views: 169
Upvote 0

Past11

Member
Hello drgottjr.
Thank you very very much, i will indeed help alot to have theese visuals thank you so much i have something to work on now :) thank you, and thank you Erel for your answers i hope my brain can wrap around it now :) thanks merry christmas.
 
Upvote 0

Past11

Member
Hello drgottjr and Erel.

i just want to say thank you for your help on the data extract, i have been trying it since your help, and it all finally made sense in the end :) so thank you very much for your assistance :)
 
Upvote 0
Top