def dumpProtocols(self, results): """docstring for dumpProtocols""" pass i = 0 for result in results: if i < 10: protocol = Protocol(result['href']) protocolId = result['href'].replace("http://www.nature.com/protocolexchange/protocols/","") f = open("files/"+protocolId+'.txt','w') f.write(protocol.toJSON()) f.close() else: break i += 1 #m = ExchangeSearch(["pcr"], 500, "community") #m.dumpProtocols(m.results) #p = Protocol("http://www.nature.com/protocolexchange/protocols/3077")