Saturday 12 June 2004 — This is over 20 years old. Be careful.
This blog runs on home-grown software, so it usually lags in technology behind the usual blog software. I’ve been pinging weblogs.com and blo.gs for a long time, and figured I could skip the other services because I didn’t want to track down how to do each one.
Today I discovered Ping-o-Matic, which is a meta-pinging service: you ping it, and it pings everyone else. Handy. But it has an XML-RPC interface, and that’s one of the things I had never spent the time to learn how to do. Well, it couldn’t be easier. The Python xmlrpclib module makes the whole thing totally transparent:
import xmlrpclib
remoteServer = xmlrpclib.Server("http://rpc.pingomatic.com/RPC2")
ret = remoteServer.weblogUpdates.ping(
"Ned Batchelder's blog",
"http://nedbatchelder.com/blog"
)
print ret['message']
So now I replaced two HTTP get pings with one XML-RPC ping, and I’m reaching more services. Sweet!
Comments
Add a comment: