3 import urllib
.request
, urllib
.parse
, urllib
.error
9 queries the public API of delicious.com and retrieves a dictionary of all
10 tags that have been used for the url, with the number of users that have
14 split
= urllib
.parse
.urlsplit(url
)
16 split
= urllib
.parse
.SplitResult(
17 split
.scheme
, split
.netloc
, "/", split
.query
, split
.fragment
22 m
.update(url
.encode("ascii"))
24 url_md5
= m
.hexdigest()
25 req
= "http://feeds.delicious.com/v2/json/urlinfo/%s" % url_md5
27 resp
= urllib
.request
.urlopen(req
).read()
29 resp_obj
= json
.loads(resp
)
35 if (not "top_tags" in o
) or (not o
["top_tags"]):
37 for tag
, count
in o
["top_tags"].items():