What it does
With a single click of a button, this program will immediately connect you to a speed test, which will record your internet's upload and download speeds. Make sure you know the speeds that your internet service provider has promised you. The code will then automatically redirect you to the Twitter log-in page, where the software will enter your email address, password, and click the sign-in button. Following that, it will automatically tweet at your internet provider, composing a message comparing your current internet speeds to the speeds promised by your provider.
How I built it
This twitter complaint bot was created using Python and Selenium Webdriver, a framework within the language. I used object-oriented programming to create a class and functions within that class. To automate the procedure, I had to scrape data from a speed test website and print the upload and download speeds I was receiving. Furthermore, in order for the software to enter the Twitter username and password, I had to locate the XPath of input elements so that the software could insert the credentials on the log-in page and click the sign-in button.
Challenges I ran into
One issue I had was that when the program tweeted at my internet provider, it only printed the download speed I was receiving, not the upload speed. This was a problem since I couldn't compare upload speeds because it wasn't printed out in the tweet. After some debugging, I found my problem. Since this entire process is automated, I set a time restriction on the speed test website. Which was the amount of time the software would stay on the site before redirecting to the Twitter log-in page. Unfortunately, the time restriction I specified was short, and the procedure would proceed to the log-in screen before printing the upload speed. Nevertheless, adjusting the time-resolved this issue.
Built With
- python
- seleniumwebdriver
Log in or sign up for Devpost to join the conversation.