Process extracts valuable biogas from wastewater