One of the forbidden types of work on Shabbat is “trapping.”
One who traps a kind of animal or bird which people usually trap, for instance, deer, birds, and the like, has transgressed the Torah prohibition of Shabbat desecration.
If one traps an animal which is not usually trapped, although he has not transgressed Shabbat desecration on a Torah level, it is nevertheless forbidden by a rabbinic decree to trap even such an animal on Shabbat.
Thus, if one chases a deer until it enters one’s house or courtyard and then proceeds to lock to door or gate behind it, he has desecrated Shabbat and is tantamount to one who has kindled a fire on Shabbat. Similarly, if one chases a bird into a cage and then locks the door behind it, he is likewise liable for Shabbat desecration. Similarly, if one fishes fish out of the sea or places fish into a bucket on Shabbat, he has also liable for Shabbat desecration.
According to Torah law, one is only liable for trapping on Shabbat if doing so will make it easy to catch the animal afterwards. (We shall not discuss the details of this law at length at this point.) Nevertheless, our Sages prohibited trapping even when it will be difficult to catch the animal after doing so.
For instance, if one chases fish from the sea or a large lake until they swam into smaller pool, he has transgressed the prohibition of trapping on Shabbat. Although it will still be difficult to catch the fish for they still have the ability to escape even in the pool, our Sages have prohibited trapping even in such a way on Shabbat. Similarly, if one chases a bird until it flies into a large house and then proceeds to close the doors and windows of the house behind it, although it is still difficult to catch it, this is still forbidden on Shabbat.
However, if one chases a bird into a house but the windows of the house are open, this does not even pose a rabbinic prohibition, for the bird can still escape by flying out of the windows. Nevertheless, once one closes the windows, he has transgressed the forbidden work of trapping on Shabbat. (See Chazon Ovadia-Shabbat, Part 5, pages 94-95).
Regarding keeping non-kosher birds at home as pets, as long as one does not have a kind of non-kosher animal at home that is meant for commercial sale and trade as food and is only meant for aesthetic and recreational purposes, there is not prohibition to raise such animals. It is therefore permissible to raise horses, donkeys, parrots, and the like. (ibid. page 96)
Even during the week one should not hunt animals which live in the wild in an illegal manner.