Enter in the name of a famous person. Once you submit, my bot will find and tweet a random quote by them.
You will be able to see the tweet once it's sent.
With each of the things I build, my objective is to learn something I don't know yet.
In this case, I wanted to figure out how Django works and get better at deploying apps.
I've already done some work with AWS but I wanted to really learn how to build the backend
of a website from scratch and how to share it.
I already had an existing Twitterbot that would do a bunch of things like tweet a quote
every few hours, DM new followers, follow people back, unfollow anyone who unfollowed me
(that's right, my bot was built to be petty).
I decided to recycle this bot and build something that's actually interactive. Using
Django I built an app that takes a name, searches for it on a specific website
and webscrapes a random quote by that person. I kept the quote webscraping component from
my previous bot
(see here for the code) and simply modified it to take a value from an HTML input
form. Then I just had to build a website with a user form, find a way to pass whatever
value was inputted into said form, pass it through my Python functions and return
the results on another webpage. Then I had to modify all my scripts so I could
actually deploy it for use by the general public. I used Heroku for deployment since
I already have some familiarity with it and since it integrates super well with
Django and Github. Lastly, I used my limited HTML knowledge to make it look pretty.
Once all that was done I still had to figure out how to embed the webpage into my blog
in such a way that it was seamlessly integrated (and so that it works).
Overall, figuring out how to build the backend of a website was tough but I'm really
pleased I was able to make something that works.
I always find that when I set out to learn something, I end up learning a million other
things I had never thought about. For example, I had never thought about dealing with CSRF,
xframes, switching between GitHub branches, or even the complications of taking values
from user inputs. What I took away from this whole project is that experience really is the best
teacher (and that it's cool to have friends
you can go to for advice - shout out to Monica and Alex).
Comments !