== Pinging weblogs.com in Python In the weblogs world, to 'ping' somewhere is to send an automated notice to an indexing site that your blog has updated. Popular indexing sites include [[weblogs.com|http://www.weblogs.com]] and [[technorati.com|http://www.technorati.com]]. Major blogging packages already do this out of the box, but if you've rolled your own (such as me, with DWiki) you're on your own. In a modern blog world with millions of blogs and RSS and Atom syndication feeds, something like [[weblogs.com]] looks more than a little bit old fashioned. The reason to still care about this stuff is two words: [[Google Blogsearch|http://blogsearch.google.com/]]. To quote from [[their FAQ|http://www.google.com/help/about_blogsearch.html]]: > How do I get my blog listed? > > If your blog publishes a site feed in any format and automatically > pings an updating service (such as Weblogs.com), we should be able > to find and list it. [...] In other words: until Google manually creates a way to add blogs, pinging [[weblogs.com]] and similar sites is the best and possibly the only way to get into their index. Certainly my experience is that WanderingThoughts got much more prompt and up to date indexing in [[Google Blogsearch]] after I started pinging places. (I believe that your feed needs to be autodiscoverable from your blog's web page for this to work.) Mechanically, pings are done through XML-RPC. It turns out that Python's [[xmlrpclib module|http://docs.python.org/lib/module-xmlrpclib.html]] makes doing XML-RPC calls very easy, once you understand the magic tricks; they turn into function calls on magic objects. Making it easier, all of the various indexing services use the same XML-RPC procedure call, just to different URLs. (XML-RPC calls have two parts: the actual RPC call, with procedure name and arguments and so on, and the target it's directed at.) So all you actually need is three lines of code you can find [[here|http://diveintomark.org/archives/2002/02/04/ping_weblogscom]] (which is where I got my start from). To save you the small effort of going there, here's some slightly more general code: > import xmlrpclib > bName = "..." > bUrl = "http://..." > > def pingEm(url): > s = xmlrpclib.Server(url) > s.weblogUpdates.ping(bName, bUrl) > > pingEm("http://rpc.weblogs.com/RPC2") > pingEm("http://rpc.technorati.com/rpc/ping") Fill in appropriate values for _bName_ and _bUrl_ and you're ready to go. If you want a list of possible places to ping (and more Python code), [[here|http://weblog.janek.org/Software/QuickHacks/Sources/ping-weblogs.py]] is one list that seems to date from 2004. Other big lists of possible places to ping can be found [[here|http://montoya.rdpdesign.com/2005/09/25/the-clean-list-of-ping-update-services/]], [[here|http://montoya.rdpdesign.com/2005/09/25/the-clean-list-of-ping-update-services/]], or [[here|http://www.thewebmarketingblog.com/2005/09/services_to_pin.html]]. Apparently, [[Ping-O-Matic|http://pingomatic.com/]] will ping pretty much everything important for you with just one ping from you (you want '!http://rpc.pingomatic.com/' as the XML-RPC target); they're even [[sort of recommended by Google|http://searchenginewatch.com/searchday/article.php/3548411]]. (Disclaimer: I found these lists by using Google Blogsearch and haven't tried any of the listed ping sites myself. I suggest checking out each one's regular site to see if it looks worthwhile to ping them. And my, there are a *lot* of blog indexing things.)