今天心血來潮想寫個列出 Plurk 內容的功能,翻開 Plurk API 一看,找到
了這個 API 「 /API/Profile/getPublicProfile 」,需要傳入 api_key 與
user_id 疑 o_O?user_id 要如何取得呢?連過去Plurk官網介紹一個非
官方新手入門手冊:http://weedyc.pixnet.net/blog/post/23311875
裡面提到一個 噗浪 UID 查詢工具: http://puid.daydream.idv.tw/
可直接查詢到 UID,很方便
這時再回頭看了一下 Plurk API 發現
/API/UserSearch/search 可以查到使用者資訊,那就來寫個程式測測吧!
import urllib, urllib2, cookielib, json
|
儲存成 test2.py 後,執行 Python test2.py
執行結果