lundi 6 janvier 2020

How to gather information from a dynamic table in a website?

I am very new to coding and just started my first "project" just for fun and learning. I plan to make a simple website. What I would like it to gather information from another website and update automatically every 5 minutes.

My question is what's the best way to get this information. Link to the website I want to retrieve information from https://www.vegvesen.no/trafikk/html/savedsearch.html?id=604

This is the information I want to pull out(marked in yellow):enter image description here

I tried web scraping in python, but I found it hard due to it being a table and dynamic. This information changes and therefore also rows get added and deleted in the table when it's getting updated. Maybe its easier to use another coding language for this type of problem?

My idea is to gather this text and then and use it on my website. I would like to display the text, and a box or square, for example, that changes colour if a certain word is used (green for open, red for closed etc (of course in this language)). This could probably be done with a simple if statement?

Remember I am a noob and doesn't have experience. Feel free to ask any questions regarding the problem or its intentions. I appreciate everyone who can help :)




Aucun commentaire:

Enregistrer un commentaire