How to Catch
You need a lategame upgrade for the net gun to catch them alive.
You can also catch them alive using the steel sensor net trap that Cobra sometimes sells in his shop.
For the spider crabs, place the trap at ground-level a little off to the side of the crab, then stand beyond the trap and the crab will slowly walk into it.
For stargazers you need to place the trap in its attack path, which I find usually requires getting hit once and making use of the invulnerability period to set the trap.