Hello
Here is code its same as link you posted nothing special.
#!/usr/bin/env python3
import ecdsa
import random
import libnum
import hashlib
import sys
G = ecdsa.SECP256k1.generator
order = G.order()
priv1 = 74151126465914553719682701372546590912032713247110001383204298192577238294259 #random.randrange(1,order)
Public_key = ecdsa.ecdsa.Public_key(G, G * priv1)
x1 = ecdsa.ecdsa.Private_key(Public_key, priv1)
priv2 = 65602009300807068992382438511465994464148703102269145684254988072233619429415 #random.randrange(1,order)
Public_key2 = ecdsa.ecdsa.Public_key(G, G * priv2)
x2 = ecdsa.ecdsa.Private_key(Public_key2, priv2)
k1 = 113430668354305125354139681412571553637810109882549088741100884487402919060793 #random.randrange(1, order)
k2 = 88941376982568942091029320764989550225390065895384871037015643141890275775717 #random.randrange(1, order)
h1 = 45063904364969322573281122086971579379876583577391310824950725157431863085693 #int(hashlib.sha256(msg1.encode()).hexdigest(),base=16)
h2 = 96925863066810859394685400246217607442326685412593308871569663983290139782035 #int(hashlib.sha256(msg2.encode()).hexdigest(),base=16)
h3 = 70890957235815785946608014568730757332857823983374044998781188028671033610413 #int(hashlib.sha256(msg3.encode()).hexdigest(),base=16)
h4 = 88400657509035765824159536685234267382896518494653799783594906135509259195161 #int(hashlib.sha256(msg4.encode()).hexdigest(),base=16)
x1sig1 = x1.sign(h1, k1)
x1sig2 = x1.sign(h3, k2)
r1,s1 = x1sig1.r,x1sig1.s
r2,s3 = x1sig2.r,x1sig2.s
#r1,s1 = 37172049453198803628923372374682424137153412099188977901809252086397375163174,36665125934301679295764426496089959157670212057714313825462899262019004181013 #x1sig1.r,x1sig1.s
#r2,s3 = 40974080779974461932858835766108658066940207003253964846620894290420102383124,88414683103569280491867470526894992004240909646745888824999991880846576153983 #x1sig2.r,x1sig2.s
#r1_1,s2 = 37172049453198803628923372374682424137153412099188977901809252086397375163174,48387795993880540164497955151292140905876432678370698441361372722465054520609 #x2sig1.r,x2sig1.s
#r2_1,s4 = 40974080779974461932858835766108658066940207003253964846620894290420102383124,94479523762013111191490500533227932711756342618388816229238677867942525385058 #x2sig2.r,x2sig2.s
x2sig1 = x2.sign(h2, k1)
x2sig2 = x2.sign(h4, k2)
r1_1,s2 = x2sig1.r,x2sig1.s
r2_1,s4 = x2sig2.r,x2sig2.s
print("valinv " + hex(r1*r2*(s1*s4-s2*s3)% order ))
print (f"Signature r1={r1}, s1={s1}")
print (f"Signature r1_1={r1_1}, s2={s2}")
print (f"Signature r2={r2}, s3={s3}")
print (f"Signature r2_1={r2_1}, s4={s4}")
valinv = libnum.invmod( r1*r2*(s1*s4-s2*s3),order)
x1rec = ((h1*r2*s2*s3-h2*r2*s1*s3-h3*r1*s1*s4+h4*r1*s1*s3 ) * valinv) % order
x2rec = ((h1*r2*s2*s4-h2*r2*s1*s4-h3*r1*s2*s4+h4*r1*s2*s3 ) * valinv) % order
print ("\nPrivate key (x1):",hex(priv1)[2:])
print ("\nPrivate recovered (x1): ",hex(x1rec)[2:])
print ("\nPrivate1 Matched ?: ",priv1 ==x1rec)
print ("\nPrivate key (x2):",hex(priv2)[2:])
print ("\nPrivate recovered (x2):",hex(x2rec)[2:])
print ("\nPrivate2 Matched ?: ",priv2 ==x2rec)