Friday, June 27

ooops! did I break

So ... I've been learning from Collective Intelligence ... and this morning I made a script to get links from, score their top users in regards to how similar their tastes are to mine, then recommend me links they preferred, that I haven't bookmarked ...

In short, it's a recommendation system (yeah ... buy the book!).

Either way, I omitted the time.sleep(4) between failed requests to the api and I ... kind of started getting this:

danone@utnapistix:~/work/python/CollectiveIntelligence$ python
Traceback (most recent call last):
  File "", line 51, in
    del_data=buildPostersDict(<tag>, <user>)
  File "", line 43, in buildPostersDict
  File "", line 8, in initializeUserDict
    for popular in get_popular(tag=tag)[0:count]:
  File "/usr/lib/python2.5/site-packages/", line 786, in get_popular
    return getrss(tag = tag, popular = 1)
  File "/usr/lib/python2.5/site-packages/", line 774, in getrss
    return dlcs_rss_request(tag=tag, popular=popular, user=user, url=url)
  File "/usr/lib/python2.5/site-packages/", line 414, in dlcs_rss_request
    rss = http_request(url).read()
  File "/usr/lib/python2.5/site-packages/", line 261, in http_request
    raise PyDeliciousException, "%s" % e
pydelicious.PyDeliciousException: HTTP Error 503: Service Temporarily Unavailable guys, if it was me that caused a denial of service on your website, I'm sorry!

No comments: