View Single Post
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#54
Tried swiss teletext; they offer a new challenge.

EDIT: forgot to include the URL: http://www.teletext.ch/

First, it'd be nice to parse because they have 6 channels in 3 languages on one site, all following the same scheme.

The downside:
The image URLs are irregular.
From what I see, they usually end in
Code:
.../[page]-00.gif
for pages that do not have sub-pages and in
Code:
.../[page]-[subpage].gif
for pages that have subpages (01-99).

Sometimes though, even pages that do not have sub-pages are
Code:
.../[page]-01.gif
instead of
Code:
.../[page]-00.gif
I couldn't detect a pattern.

So when you browse subpages, it's clear what you need to fetch. When you go to a main page, it could end in either "-00.gif" (which it usually does) or "-01.gif". You just don't know.

You might change your logic so that people can add a SubImageUrl in addition to the imageUrl. (If not set, it'll have the same value as imageUrl.) The application would then use imageUrl to address main pages, subImageUrl to cycle through subpages and would use subImageUrl for subpage #1 as a fallback in case imageUrl fails. That would do for swiss teletext (imageurl=.../[page]-00.gif and subimageurl=../[page]+[subpage].gif, [page]-01 being the fallback if [page]-00 fails.). Maybe other services also have different URL schemes for main pages and subpages.

Last edited by benny1967; 2010-02-03 at 20:51.
 

The Following User Says Thank You to benny1967 For This Useful Post: