Home | History | Annotate | Download | only in tools

Lines Matching refs:URL

31 class URL(object):
32 """Represents a broken-down URL from our most visited database."""
34 def __init__(self, id, url):
35 """Initialize a new URL object. |id| is the database id of the URL."""
37 self.url = url
38 scheme, loc, path, query, fragment = urlparse.urlsplit(url)
49 if len(fragment) > 0 or url.find('#') > 0:
54 """Pretty-print this URL in a form more suitable for the graph.
154 urls = {} # Map of urlid => url.
155 urls['0'] = URL('0', 'start') # Node name '0' is our special 'start' node.
156 for id, url in db.Run('SELECT id, url FROM urls'):
157 urls[id] = URL(id, url)
162 for src, dst, url, trans in db.Run('SELECT from_visit, id, url, transition '
164 visiturlids[dst] = url
185 hosts = ClusterBy(urls.values(), lambda url: url.host)
192 paths = ClusterBy(urls, lambda url: url.path)
199 for url in urls:
200 if url.id == '0': continue # We already output the special start node.
201 pretty = url.PrettyPrint(include_host=not host_clustered,
203 print ' %s [label="%s"]' % (url.id, EscapeDot(pretty))