python script for extracing domain types