How do we extract the private key of the Dapp that logs in with Internet Identity?

Is there a way to extract the private key of the Dapp that logs in with Internet Identity?
I want to create a Dditrikt or other posting bot using ic-py.

I think this thread is may help, but I can’t understand it well.
Could you please tell me the conclusion?

Thank you.