Open bard.google.com and login to start your session. Press F12 to inspect and go to application tab and copy the following values and paste in the placeholders in file 'keys.json'. You can visit repo https://github.com/dsdanielpark/Bard-API for further clarification.
cookie_dict = {
"__Secure-1PSID": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"__Secure-1PSIDTS": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"__Secure-1PSIDCC": "xxxxxxxxxxxxxxxxxxxxxxxxx"
# Any cookie values you want to pass session object.
}
Get Linkedin access token and paste it in the placeholder.
access_token = "xxxxxxxxxxxxxxxxxxxxxxxxx"
In the prompt give the appropriate and relevent prompt as your own requirement and taste.
BardOutput = (bard.get_answer("Act as a professional Linkedin content writer who has expertise in writing authentic and engaging content. You will write an linkedin post on "+str(topic)+",trying to maximize likes and comments. You can use historical stories as well as future predictions.")['content'])