Python/Hatena: Wrapper Module for Hatena Bookmark API

Python/Hatena provides unified methods to obtain Hatena Bookmark data by wrapping a series of Hatena Bookmark API and RSS feeds into one module.

You can obtain data from Hatena Bookmark intuitvely than original XML-RPC.

Its query API like .titles_urls are refer to Django Framework's one.

Example

>>> import hatena
>>> for title, url in hatena.b.hot.python.titles_urls:
... print 'title: %s\nurl: %s\n' % (title, url)
...
title: 「みんなのPython」: 正誤表 TRIVIAL TECHNOLOGIES 2.0
url: http://coreblog.org/ats/stuff/minpy_support/errata/

title: KeN's GNU/Linux Diary | 『みんなのPython』
url: http://kmuto.jp/d/index.cgi/review/minpy.htm

...

(many other examples are written as comments of source code)

Prerequisites

You need simplejson and feedparser modules to use Python/Hatena module

Download

hatena.py

ċ
hatena.py
(13k)
Yusuke Yanbe,
2008/10/04 1:14
Comments