Electronic structure of pyrrole-based conducting polymers