This is not even close to an answer to your question, but
it may be easier for you if you get a local copy of CDD and
the related web tools. It probably would make the people
at NCBI happy to have one less person writing scripts that hammer
their website (if your script is going to be used in any
sort of high throughput way).