https://drugs-forum.com has a good essay on how to extract mescaline from the San Pedro cactus. I would guess the method can also be applied to any type of Mescaline cactus.
You would need some basic chemistry knowledge and equipement if you ever try this out. May i suggest also to be carefull, this isn't quite a fool proof method, it can be dangerous without proper protection.