from wrdl import Wrdl wrdl = Wrdl("meerkat.wrdl") # bind a resource type to a URI r = wrdl.newResource("meerkat", "http://www.oreillynet.com/meerkat/") # now GET that resource...any representation rep = r.GET( channel=555, timePeriod="7DAY", search="Prescod") # alternately, GET a particular representation # (in this case "meerkat_rss_flavour") rep = r.GET_meerkat_rss_flavour( channel=555, timePeriod="7DAY", search="Prescod") text = rep.body() # get resource body assert text.find("Prescod")>0 # vanity assertion # get a list of references (XML or HTML hyperlinks) prinn = rep.data()["channel"].title webpage = rep.data()["channel"].link.AsWRDL() # Get the channel link as WRDL newres = webpage.GET() # get the resource body for that link text = newres.body() print text #assert text.find("Prescod")>0 #vanity assertion