Skip to content

Instantly share code, notes, and snippets.

Last active February 29, 2016 11:14
What would you like to do?
# coding: utf-8
import urllib
import xmlrpclib
while True:
# 標準入力の値を取得
uri = raw_input()
# urlをパース
type, uri = urllib.splittype(uri)
# urlのスキームをチェック
if type not in ("http", "https"):
raise IOError("unsupported protocol")
server = xmlrpclib.ServerProxy("")
# はてブの合計数を出力
print server.bookmark.getTotalCount(type + ":" + uri)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment