its all about wordpress_xmlrpc for python lets start with code:
wp1 = Client('http://example.com/xmlrpc.php', 'username1', 'pass1') wp2 = Client('http://example.com/xmlrpc.php', 'username2', 'pass2')
this works fine when I try to add new comment: komment_id = wp1.call(NewComment(post_id, komment)) komment_id = wp2.call(NewComment(post_id, komment))
however I would like to do it randomly, so Im looking for solution to change X to number:
komment_id = wpX.call(NewComment(post_id, komment))
I have tried a lot of options and non of them works:
Fail1:
wpnumber = randint(1,10)
test = str('wp')+str(wpnumber)
komment_id = test.call(NewComment(post_id, komment))
Fail2:
komment_id = %d.call(NewComment(post_id, komment)) % (test)
Fail3: (and all its mutation with " ' ( ) , ( ) ) etc.
komment_id = test + .call(NewComment(post_id, komment))
Fail4:
komment_id = wp+wpnumber+.call(NewComment(post_id, komment))
To be honest, I tried 10 different ways with %s with %d, joining variables, spliting everything...
Anyone Could Help?