Meander Your Google Neighborhood

Google Neighborhood attempts to detangle the Web by building a “neighborhood” of sites around a URL.

It’s called the World Wide Web, not the World Wide Straight Line. Sites link to other sites, building a web of sites. And what a tangled web we weave.

Google Neighborhood by the Python-wise Mark Pilgrim ( attempts to detangle some small portion of the Web by using the Google API to find sites related to a URL that you provide, scraping the links on the sites returned and building a “neighborhood” of sites that link both the original URL and each other.

If you’d like to give this hack a whirl without having to run it yourself, there’s a live version available at The source code (included in the following section) for Google Neighborhood is available for download from

The Code

Google Neighborhood is written in the Python ( programming language. Your system will need to have Python installed for you to run this hack.

"""Blogroll finder and aggregator""" __author_ _ = "Mark Pilgrim (" __copyright_ _ = "Copyright 2002, Mark Pilgrim" __license_ _ = "Python" try: import timeoutsocket # timeoutsocket.setDefaultSocketTimeout(10) except: pass import urllib, urlparse, os, time, operator, sys, pickle, re, cgi, ...

Get Google Hacks, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.