Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Meerkat script suddenly fails: output format changed?

Reply
Thread Tools

Meerkat script suddenly fails: output format changed?

 
 
Steve Holden
Guest
Posts: n/a
 
      07-02-2003
For quite a while now I've been filling part of the navigation-bar on my
home page with Python-related news extracted from O'Reilly's meerkat
service.

I've been experiencing intermittent problems for the past few days, and now
suddenly the crontab-triggered script has stopped working completely,
apparently due to a change in what Meerkat sends in response to my queries.
I've not been able to find any description af changes to Meerkat, but since
my script appears to have been unchanged for over six weeks and this error
has only just appeared, I can only assume this represent searching
ineptitude on my part.

The relevant extracts from the script are:

# Get a list of article categories from the O'Reilly Network
items = server.meerkat.getItems(
{'search':'/[Pp]ython/','num_items':10,'descriptions':100})

and

print >> out, "<BR>\n".join(
["""<A href="%(link)s" class="link" target="news_win">%(title)s</A>
""" % item for item in items]

It's this last statement which is now failing, with a KeyError because
there's no "link" key in the items returned by the call to
server.meerkat.getitems(). Printing out the list of items confirms this,
with what I can only describe as a somewhat-unexpected output:

{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}
{'description': "Senator Kennedy's new inaccessible web site. On writing for
the web. The Python path module. The art", 'title': 'In brief: Superbowl
Sunday'}

About the only thing I find reassuring about this output is the fact that it
explains the KeyError, and that

http://www.oreillynet.com/meerkat/

looks equally disoriented if you search for the string "python". What gives?

Can anyone tell me a) is this something I've done, or is it somebody else's
fault, and b) how the hell do I get back to the happy state where I can get
my Python news form my home page?

regards
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Meerkat Manor Rgr Computer Support 15 02-28-2008 03:21 AM
Meerkat, Blinky The Shark, Whiskers...See a theme going here? Nuze Groops Computer Support 14 01-09-2008 07:33 PM
How to fetch output of some other script in the current running perl script? ritugoyal12@gmail.com Perl Misc 4 10-27-2007 03:52 PM
Want help on how we convert output to tabular format Using the expat parser (http://expat.sourceforge.net/) i have to parse the following xml file and print it on the screen in tabular format. sharan XML 1 10-26-2007 01:20 PM
Script to format existing Access table into wall calendar format? Lee Falataco ASP General 2 08-10-2004 01:42 AM



Advertisments