The Forerunners probably took samples of spores for investigation after battles, or during sterilization. They also had to fight a Gravemind on one of the Halos (see Halo: Primordium) which would have provided abundant research samples.
You're also underestimating the scope of the Flood infection. It is implied that each Halo only kept maybe 2 or 3 spores for study, maybe a few infection forms, and MAYBE some specialized Cold Storage facilities would keep larger intact flood forms (but this is debatable due to the nature of the Halo Array). The Forerunners knew and stated that a single Flood spore could wipe out all life in the galaxy in the Halo:CE Anniversary Terminals (a statement repeated by the Sanghelli in Halo 3 after the Battle of Voi).
So they weren't captured, rather this was probably investigation of quarantined areas turned into desperate attempts to research a magical cure to the Flood, which, according to Primordium, can't exist.