in reply to Re: Framework for News Articles
in thread Framework for News Articles

There exists 1000s of news website on Internet. The problem is that many websites changes over time. The structure constantly changes and it is not always easy to write the parser to get the appropriate information. There are several concerns. How do you find which are the 'new' news? What do you do when the story spans several pages?. How do you find where are the links for the stories?. How do you know which are not the advertizes or logo and the actual image for the story?

You've just hit on the difference between a programming interface and an implementation of that interface. While the specific details of a site's design may change over time, there are certain characteristics inherent to the data that should always exist. A well-designed solution for scraping news articles would have some sort of API that defines common attributes of all articles, and a set of site-specific implementations of this API. If a single site changes its structure, then just change the implementation while keeping the API consistent.

For example, smalhotra discusses "title, publisher, date, author, byline, content, category, related articles, related links, imbedded images" as being general classes of information, that a news article could have.

Replies are listed 'Best First'.
Re: Re: Re: Framework for News Articles
by artist (Parson) on Mar 25, 2004 at 06:17 UTC
    Yep,
    smalhotra asked about screenscraping/parsing of HTML. That's implementation and that's not easy. Defining API is trivial task compared to implementation here.