philwilson.org

Mobile Teletext

14 November, 2006

Barbie Horse Adventures sucks

I quite like teletext. The old, chunky teletext that is. It provides great, bite-sized chunks of information. To date the information hasn’t been republished on the internet – the positioning would be crazy; teletext can’t and shouldn’t compete with online resources.

However.

This week Teletext launched a mobile service (the website provides a number of mobile emulators so you can see . This makes perfect sense since the amount of text you can get on your mobile screen is quite similar to the amount displayed in the blocky old teletext (as you can see in the screenshot).

If you try and visit the mobile URL (such as this one), the server does some user-agent sniffing and redirects you to the HTML version. I tried a quick wget, specifically:

wget --user-agent='Nokia6630/1.0 (2.39.129) Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1' http://www.teletextmobile.co.uk/portal.aspx?pn=806&uid=1111702181083416953519691784019712536148&rnd=23112

and it does return a WML page, but it appears to be a portal page, and doesn’t maintain the page number I wanted to visit (806 in this case). When I visit the same page in my mobile browser it goes where expected.

I admit to being a wget noob, so where exactly am I going wrong? It’d be great to pull this content and push it into, say, a widget on my desktop, but not until I break the wget idiot-barrier.

OK, so installed the User Agent Switcher Firefox extension and configured it with the Nokia 6680 User-Agent (“Mozilla/4.0 (compatible; MSIE 5.0; Series80/2.0 Nokia9300/05.22 Profile/MIDP-2.0 Configuration/CLDC-1.1)”) and that worked a treat, giving me the content I wanted, but putting the same string into wget still gave me the Teletext Mobile splash page. Help welcome!

See other posts tagged with general and all posts made in November 2006.

Comments

Gareth
14 November, 2006 at 23:21

Have you tried sniffing the headers that Firefox is sending?

Maybe something in the accept header to include wml or something ?

Just somewhere to start.

Irregular Shed
14 November, 2006 at 23:31

Can you get it to show you page 888? Who needs TV on your mobile when you can just read it, eh? =)

Pip
15 November, 2006 at 10:45

Well, I am getting WML content back (with, I think, the right MIME-type). Annoying, I don’t think that the LiveHTTPHeaders extension works with Firefox 2, otherwise I would have sniffed the headers already, but I’ll look into the alternatives.

888 – I wish!

Aristotle Pagaltzis
15 November, 2006 at 13:33

Works for me:

curl -iA ‘Nokia6630/1.0 (2.39.129) Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1’ ‘http://www.teletextmobile.co.uk/portal.aspx?pn=806&uid=1111702181083416953519691784019712536148&rnd=23112’

Anonymous
16 November, 2006 at 11:24

Did you quote the URL with single quotes? Otherwise under Linux the shell spots the ampersand and wget just gets the page “http://www.teletextmobile.co.uk/portal.aspx?pn=80”

I got back a page about “Halo 3 spring
s into action”.

Paul S
16 November, 2006 at 22:56

This worked!

wget ‘http://www.teletextmobile.co.uk/portal.aspx?pn=806&uid=1111702181083416953519691784019712536148&rnd=23112′ –user-agent=’Nokia6630/1.0 (2.39.129) Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1’ -O – | lynx -stdin

Paul S
16 November, 2006 at 23:00

or

wget ‘http://www.teletextmobile.co.uk/portal.aspx?pn=806&uid=1111702181083416953519691784019712536148&rnd=23112′ –user-agent=’Nokia6630/1.0 (2.39.129) Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1’ -O – | lynx -stdin -dump -nolist | perl -ne “print if /Teletext Entertainment/../Add to My Teletext/”

Pip
17 November, 2006 at 12:41

Matt and Paul: You are both right and I am a jackass.

I should rig my keyboard so that if I’m in a terminal and enter double-quotes it gives me an electric shock.

I even noticed that it was running in the background but didn’t even stop to ask why. My excuse is that it was late. The reason is that I was stupid 🙂

Thanks very Paul for the hyper-useful code, too!