Hey guys welcome to day 51
of 100 Days of Code. Today
we're going to be building a Complaining Twitter bot.
I dunno about you, but I'm the sort of person who really,
really hates dealing with customer service. Very often,
if I buy a product and it doesn't work
or it gets shipped to me broken,
I will actually just put it down to bad luck to avoid having to deal with
1: customer service. I find it really hard calling up customer service,
0: waiting on the line,
and it's just generally a really difficult experience for me.
But what if it's something that really bothers you that you need to complain
about in order to get it fixed? Well,
this particular internet user was promised a internet speed from Comcast,
so Xfinity in the US where he was meant to get 150 kilobits down and 10
kilobits up.
But what he found was that actually for a lot of the time,
he wasn't getting the promised internet speeds.
So he would do a speed test and then send his internet speeds by Twitter
to Comcast to complain. Now,
depending on who your internet provider is and how much you're paying,
they tend to guarantee a minimum internet speed. Now,
very often though, most people aren't testing their internet speeds every day.
Just occasionally you feel like, oh, it feels a bit slow today.
Or why is my download taking so long? If you look in your contract,
you'll often find that guaranteed minimum speed in terms of megabits per second.
For most people, it's probably going to be around 30 megabits or 60 megabits
depending on how much you pay. Now for a lot of providers,
they actually have a guarantee where if you can prove that the internet speed
that you're getting is not what they promised,
they'll actually give you your money back or even better
they might try and fix it.
So what this Comcast user did is he would test his internet speed and then tweet
automatically to Comcast and complain that his internet speed is only 23 down
5 up when he's paying 150 down 10 up. Now,
the reason why people interact with Twitter in terms of customer service is
because it's public.
Everybody else can see your complaint to a particular company
and if they're a large brand or a large company,
then they tend to have a social media monitor.
And often the customer service you get by complaining on Twitter can actually be
even better than if you call them up or if you email them.
One of the best customer service teams on Twitter is JetBlue.
And on the internet,
you've got lots of examples of people having a really great experience with the
customer service team on Twitter from JetBlue, for example,
this guy who was on a flight and his TV didn't work,
and they actually ended up offering him, um,
flight credits just on the spot for having a broken TV,
all achieved using a couple of tweets. Now,
recently I was even reading this article in time magazine
where it's talking about 'Does tweeting at companies really work?' And very often,
yes, it really does. And even when you look at this basically Python
Twitter bot,
you can see that he often got replies from Comcast and other users chipping in
trying to get ahold of Comcast to fix their internet as well. Now,
Comcast is probably quite well known to having pretty bad customer service.
In fact, there's this post which I'll link to, um,
where a journalist was trying to cancel their Comcast service
and it took something like 5 or 10 minutes where the customer service guy was
just trying really,
really hard to not let them cancel even sometimes being quite condescending and
a bit mean. But in this conversation,
you actually hear the Comcast person saying we're the only people who can
promise you a hundred megabit download speed. And in fact,
when you look at the Comcast users tweets,
you can see often that is actually not the case.
So this can also bolster your argument when you want to leave an internet
service or when you want to get money back
or when you just want somebody to fix your internet speeds.
The website we're going to be using is speedtest.net
which is probably one of the best speed test websites out there.
And what we're going to do is we're going to use our bots using selenium to
press go.
You can see it's going to start working out my download speeds and my upload
speeds. Now this often takes anywhere between sort of half a minute to
two minutes depending on your internet speed.
But once it's done,
then we'll end up with a result ID as well as our download speed and our upload
speed.
And you can then compare these against what you were promised by your internet
service provider. And then we're going to tweet at our provider.
So if it's Comcast or AT&T or in the UK, it could be BT or Sky,
whatever it may be.
And then we're going to tell them about our terrible internet speeds compared to
what we pay for. So that's the goal.
And when I run my internet speed Twitter bot, you can see
this is what happens.
2: [inaudible],
0: That's the goal. Once you're ready head over
to the next lesson and let's get started.