DEV Community

Cover image for Day 12 of 100DaysOfCode
Arttu Pyykönen
Arttu Pyykönen

Posted on

Day 12 of 100DaysOfCode

Decided to take a break from JavaScript and make a Twitter bot using Python. I looked for a tutorial online and was able to find one that seemed good. The tutorial was by Code Wizard

Got to the end of the tutorial but the bot isn't quite finished yet. I got it working but then wanted to add some features and now I need some debugging. It will be a task for another time.

Working on my own little project was fun! Also now I remember how lovely the Python syntax is.

The Twitter bot was made using the Tweepy library and the tutorial linked above. Tweepy has great documentation and making a bot was simple and fun (after I was granted access to Twitter API).

My process for getting approved for a developer account and getting access to Twitter API was surprisingly difficult. In the tutorial, it was only a matter of sending the application and that was done. I had to send multiple emails telling them why I need access and what I'm going to do with it.

So if you are going to make your own bot remember to be very specific about your intentions. Also, read Twitter's general and Automation Rules.

Once the bot is live I'll share the code on GitHub and will link it here.

What I did today:

1. Started building a Twitter bot

What I learned from it:

  • Working with APIs and libraries
  • Reading and writing to files
  • Reading documentation

Time spent learning:

Task 'Twitter bot'. Elapsed time: 1 h 25 min 46 s

Time spent actually coding: 1h 15min

Total time: 1 h 25 min

This doesn't include time emailing Twitter and reading the rules, which probably adds an extra hour.

Time spent is tracked by my TaskTimer script and the WakaTime app

Further reading


Check out FCC for the best interactive exercises! I have finished the Basic JavaScript and ES6 lessons and can recommend them for a beginner! You can read more about the Basic JS from the post "Day 8" and ES6 from yesterday's post.

Eloquent JavaScript book


You can check my answers to the exercises of Eloquent JavaScript. You'll find them here.

This was a fun day! See you all tomorrow! :)

Top comments (0)