Need help to get out news/tables from a website


  1. mongoms

    mongoms New Member

    Hi.

    I am making a simple app for a local football team.

    I've created the UI, but I am struggling to get further.

    What I have planned:
    - One site where news will be showed, and maybe just the headline with a "read more" button which is leading you to the actual article on the website.
    - One site with a score table which is automatically updating from a website.

    What i need help to:
    - How can i create this, when the site doesn't have RSS?
    - How can i get out just that scoretable from a website, and JUST show this table in the app?

    NB: This is my first time trying to make an app.

    Thank you!

    Advertisement
    :
  2. dlhavema

    dlhavema Well-Known Member

    The simplest way to do this without an RSS feed would be to "spider" the website and then parse the results. Can I assume you know the URLS of how to fetch each page you want ( the news, and the scores ) ? If not find out :)

    Look at the source of those pages in a text editor and figure out where and how you can split the full HTML into only what you want. Make sure you use some tag that is unique to the content you want. for example, maybe the news section is wrapped in a div tag that looks like <div id='news'>....</div> <div id='whatevers next'>.... Then you'd look for the start of the "<div id='news'>" tag and then go until you find the "<div id='whatevers next'>" tag and back up a little bit.

    But really, it depends on the website you are parsing. also if it changes a lot, then you might be in trouble :/
Loading...

Share This Page