DEV Community

Ingi
Ingi

Posted on

Bot posting on twitter using Plang

This article is about the Plang programming language, intent based programming language written in natural language. For more info checkout plang.is

Here a simple one for you

Start
- read post.txt, into %post%
- open  in browser, use default profile
- wait 3 sec
- write innerHtml = '%post%' into .public-DraftStyleDefault-block > span
- click on div[data-testid="tweetButtonInline"]
Enter fullscreen mode Exit fullscreen mode

It starts by reading the content from the post.txt file into the %post% variable. Then, it opens twitter.com, waits for it to load, inputs the content into the tweet box, and clicks the tweet button.

Clean and simple.

Make sure to check out the Plang repository and our website at plang.is.

Top comments (0)