mardi 18 juin 2019

How to display a specifc part of an online HTML webpage onto my HTML webpage?

Long story short, I am trying to create an extremely simple HTML page that will display newly published articles from an online source (like Reddit) onto my document. I do not want to use something like RSS, but instead would like to create my own quickly-updating feed using HTML.

I am extremely new at programming, but I've watched a bunch of videos to try to learn how to do this and searched through Stackoverflow, but wasn't able to find exactly what I was looking for. I've also tried incorporating another news source's RSS feed using Javascript, and while I was eventually able to make it work, the website only updated their RSS like every 30 minutes, so I didn't get real-time news (right when it's published).

Using Reddit as an example, what I visualize is linking Reddit's HTML document onto mine, and then displaying only some parts of the HTML document (i.e. the first 10 headlines with their link and timestamp, as shown in the Inspect Element). This way, since Reddit's HTML would be updated as soon as an article is posted, I can add meta-refresh to my HTML (which is connected to Reddit) so that my HTML is also updated a few seconds after theirs.

If possible, please only use HTML and Javascript because it is hard for me to understand other languages and libraries and functions. Any help is appreciated, thanks!

enter image description here




Aucun commentaire:

Enregistrer un commentaire