1. Check out our companion app, Forums for Android! Download from Google Play

Need help to get out news/tables from a website

Discussion in 'Application Development' started by mongoms, Sep 12, 2012.

  1. mongoms

    mongoms New Member
    Thread Starter

    Sep 12, 2012

    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!


  2. dlhavema

    dlhavema Well-Known Member

    Sep 27, 2011
    Software Developer
    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 :/

Share This Page