Source: site.view [edit]
Function name: a9
Arguments: term
Description: Return list of links from a9 search results
Page type: webl
Render function:   linklistRender
Module: global

Page source:

var page, pieces;
var results = [ ];

// Collect 2 pages of results (20)
every n in [1,2] do
  page = GetURL("http://a9.com/"+Url_Encode(term), [. pw = ToString(n) .]);
  // Get links: select all "a" elements of class "r-a"
  pieces = Select(Elem(page, "a"), fun(e) (e.class == "r-a") ? false end);

  // Add to list of results (and strip out other junk in <a> tag) 
  every p in pieces do
    results = results + [ [. link=p.href, title=Text(Content(p)) .] ];
  end;
end;

results