When our little one kept getting infections, she was only a pup and i had terrible trouble getting a sample! I used to use a plastic sandwich bag !!
I would just dart it under mid stream and the vet thought it was a good idea...
Did feel a bit of a plonker walking in with a bag full of pee though
(I think some people thought i had taken 'clean up after your dog' to the extreeme!)