'Returns a DeliciousURL instance representing the Delicious.com history of url.
Generally, this method is what you want for getting title, bookmark, tag,
and user information about a URL.
Delicious only returns up to 50 bookmarks per URL. This means that
we have to do subsequent queries plus parsing if we want to retrieve
more than 50. Roughly speaking, the processing time of get_url()
increases linearly with the number of 50-bookmarks-chunks; i.e.
it will take 10 times longer to retrieve 500 bookmarks than 50.
@param url: The URL of the web document to be queried for.
@type url: str
@param max_bookmarks: Optional, default: 50.
See the documentation of get_bookmarks() for more information
as get_url() uses get_bookmarks() to retrieve a url\'s
bookmarking history.
@type max_bookmarks: int
@param sleep_seconds: Optional, default: 1.
See the documentation of get_bookmarks() for more information
as get_url() uses get_bookmarks() to retrieve a url\'s
bookmarking history. sleep_seconds must be >= 1 to comply with
Delicious.com\'s Terms of Use.
@type sleep_seconds: int
@return: DeliciousURL instance representing the Delicious.com history
of url.'

def get_url(self, url, max_bookmarks=50, sleep_seconds=1):

    assert (sleep_seconds >= 1)
    document = DeliciousURL(url)
    m = hashlib.md5()
    m.update(url)
    hash = m.hexdigest()
    path = ('/v2/json/urlinfo/%s' % hash)
    data = self._query(path, host='feeds.delicious.com')
    if data:
        urlinfo = {}
        try:
            urlinfo = simplejson.loads(data)
            if urlinfo:
                urlinfo = urlinfo[0]
            else:
                urlinfo = {}
        except TypeError:
            pass
        try:
            document.title = (urlinfo['title'] or u'')
        except KeyError:
            pass
        try:
            top_tags = (urlinfo['top_tags'] or {})
            if top_tags:
                document.top_tags = sorted(top_tags.iteritems(), key=itemgetter(1), reverse=True)
            else:
                document.top_tags = []
        except KeyError:
            pass
        try:
            document.total_bookmarks = int(urlinfo['total_posts'])
        except (KeyError, ValueError):
            pass
        document.bookmarks = self.get_bookmarks(url=url, max_bookmarks=max_bookmarks, sleep_seconds=sleep_seconds)
    return document
