1
00:00:00,180 --> 00:00:02,250
Hey guys welcome to day 51

2
00:00:02,250 --> 00:00:05,400
of 100 Days of Code. Today

3
00:00:05,400 --> 00:00:09,090
we're going to be building a Complaining Twitter bot.

4
00:00:09,870 --> 00:00:12,810
I dunno about you, but I'm the sort of person who really,

5
00:00:12,810 --> 00:00:16,920
really hates dealing with customer service. Very often,

6
00:00:17,010 --> 00:00:20,070
if I buy a product and it doesn't work

7
00:00:20,100 --> 00:00:22,020
or it gets shipped to me broken,

8
00:00:22,440 --> 00:00:26,610
I will actually just put it down to bad luck to avoid having to deal with

9
00:00:26,630 --> 00:00:31,040
customer service. I find it really hard calling up customer service,

10
00:00:31,130 --> 00:00:32,299
waiting on the line,

11
00:00:32,689 --> 00:00:35,990
and it's just generally a really difficult experience for me.

12
00:00:36,740 --> 00:00:40,580
But what if it's something that really bothers you that you need to complain

13
00:00:40,580 --> 00:00:42,860
about in order to get it fixed? Well,

14
00:00:42,860 --> 00:00:47,860
this particular internet user was promised a internet speed from Comcast,

15
00:00:48,770 --> 00:00:53,770
so Xfinity in the US where he was meant to get 150 kilobits down and 10

16
00:00:55,190 --> 00:00:56,300
kilobits up.

17
00:00:56,780 --> 00:01:00,230
But what he found was that actually for a lot of the time,

18
00:01:00,230 --> 00:01:03,140
he wasn't getting the promised internet speeds.

19
00:01:03,470 --> 00:01:08,470
So he would do a speed test and then send his internet speeds by Twitter

20
00:01:08,810 --> 00:01:12,380
to Comcast to complain. Now,

21
00:01:12,410 --> 00:01:16,190
depending on who your internet provider is and how much you're paying,

22
00:01:16,220 --> 00:01:20,870
they tend to guarantee a minimum internet speed. Now,

23
00:01:20,930 --> 00:01:25,030
very often though, most people aren't testing their internet speeds every day.

24
00:01:25,110 --> 00:01:28,310
Just occasionally you feel like, oh, it feels a bit slow today.

25
00:01:28,310 --> 00:01:32,990
Or why is my download taking so long? If you look in your contract,

26
00:01:32,990 --> 00:01:37,990
you'll often find that guaranteed minimum speed in terms of megabits per second.

27
00:01:39,680 --> 00:01:44,000
For most people, it's probably going to be around 30 megabits or 60 megabits

28
00:01:44,240 --> 00:01:48,350
depending on how much you pay. Now for a lot of providers,

29
00:01:48,380 --> 00:01:53,380
they actually have a guarantee where if you can prove that the internet speed

30
00:01:53,540 --> 00:01:55,820
that you're getting is not what they promised,

31
00:01:56,060 --> 00:01:59,630
they'll actually give you your money back or even better

32
00:01:59,660 --> 00:02:01,190
they might try and fix it.

33
00:02:01,850 --> 00:02:06,850
So what this Comcast user did is he would test his internet speed and then tweet

34
00:02:07,280 --> 00:02:12,280
automatically to Comcast and complain that his internet speed is only 23 down

35
00:02:13,490 --> 00:02:17,780
5 up when he's paying 150 down 10 up. Now,

36
00:02:17,780 --> 00:02:21,680
the reason why people interact with Twitter in terms of customer service is

37
00:02:21,680 --> 00:02:22,760
because it's public.

38
00:02:22,790 --> 00:02:26,810
Everybody else can see your complaint to a particular company

39
00:02:27,080 --> 00:02:29,540
and if they're a large brand or a large company,

40
00:02:29,810 --> 00:02:32,930
then they tend to have a social media monitor.

41
00:02:32,990 --> 00:02:37,280
And often the customer service you get by complaining on Twitter can actually be

42
00:02:37,280 --> 00:02:40,160
even better than if you call them up or if you email them.

43
00:02:40,610 --> 00:02:44,180
One of the best customer service teams on Twitter is JetBlue.

44
00:02:44,540 --> 00:02:45,470
And on the internet,

45
00:02:45,470 --> 00:02:49,970
you've got lots of examples of people having a really great experience with the

46
00:02:49,970 --> 00:02:53,450
customer service team on Twitter from JetBlue, for example,

47
00:02:53,450 --> 00:02:57,020
this guy who was on a flight and his TV didn't work,

48
00:02:57,320 --> 00:02:59,590
and they actually ended up offering him, um,

49
00:02:59,680 --> 00:03:03,250
flight credits just on the spot for having a broken TV,

50
00:03:03,550 --> 00:03:06,220
all achieved using a couple of tweets. Now,

51
00:03:06,220 --> 00:03:09,430
recently I was even reading this article in time magazine

52
00:03:09,460 --> 00:03:13,510
where it's talking about 'Does tweeting at companies really work?' And very often,

53
00:03:13,540 --> 00:03:17,890
yes, it really does. And even when you look at this basically Python

54
00:03:17,950 --> 00:03:18,783
Twitter bot,

55
00:03:19,150 --> 00:03:23,950
you can see that he often got replies from Comcast and other users chipping in

56
00:03:23,950 --> 00:03:28,720
trying to get ahold of Comcast to fix their internet as well. Now,

57
00:03:28,810 --> 00:03:33,760
Comcast is probably quite well known to having pretty bad customer service.

58
00:03:34,120 --> 00:03:36,850
In fact, there's this post which I'll link to, um,

59
00:03:36,880 --> 00:03:40,630
where a journalist was trying to cancel their Comcast service

60
00:03:40,810 --> 00:03:45,810
and it took something like 5 or 10 minutes where the customer service guy was

61
00:03:46,300 --> 00:03:48,010
just trying really,

62
00:03:48,010 --> 00:03:53,010
really hard to not let them cancel even sometimes being quite condescending and

63
00:03:53,770 --> 00:03:56,860
a bit mean. But in this conversation,

64
00:03:56,860 --> 00:04:00,580
you actually hear the Comcast person saying we're the only people who can

65
00:04:00,580 --> 00:04:05,140
promise you a hundred megabit download speed. And in fact,

66
00:04:05,140 --> 00:04:07,060
when you look at the Comcast users tweets,

67
00:04:07,300 --> 00:04:09,490
you can see often that is actually not the case.

68
00:04:09,790 --> 00:04:13,030
So this can also bolster your argument when you want to leave an internet

69
00:04:13,030 --> 00:04:15,160
service or when you want to get money back

70
00:04:15,250 --> 00:04:17,800
or when you just want somebody to fix your internet speeds.

71
00:04:18,490 --> 00:04:21,700
The website we're going to be using is speedtest.net

72
00:04:21,730 --> 00:04:25,330
which is probably one of the best speed test websites out there.

73
00:04:25,780 --> 00:04:30,670
And what we're going to do is we're going to use our bots using selenium to

74
00:04:30,700 --> 00:04:31,780
press go.

75
00:04:32,110 --> 00:04:37,110
You can see it's going to start working out my download speeds and my upload

76
00:04:37,180 --> 00:04:41,890
speeds. Now this often takes anywhere between sort of half a minute to

77
00:04:41,920 --> 00:04:44,560
two minutes depending on your internet speed.

78
00:04:46,960 --> 00:04:48,190
But once it's done,

79
00:04:48,220 --> 00:04:53,220
then we'll end up with a result ID as well as our download speed and our upload

80
00:04:53,830 --> 00:04:54,550
speed.

81
00:04:54,550 --> 00:04:58,630
And you can then compare these against what you were promised by your internet

82
00:04:58,660 --> 00:05:03,370
service provider. And then we're going to tweet at our provider.

83
00:05:03,580 --> 00:05:08,530
So if it's Comcast or AT&T or in the UK, it could be BT or Sky,

84
00:05:08,530 --> 00:05:09,400
whatever it may be.

85
00:05:09,820 --> 00:05:13,660
And then we're going to tell them about our terrible internet speeds compared to

86
00:05:13,660 --> 00:05:17,290
what we pay for. So that's the goal.

87
00:05:18,370 --> 00:05:21,850
And when I run my internet speed Twitter bot, you can see

88
00:05:21,850 --> 00:05:22,870
this is what happens.

89
00:05:23,160 --> 00:05:28,160
[inaudible],

90
00:05:33,330 --> 00:05:35,970
That's the goal. Once you're ready head over

91
00:05:35,970 --> 00:05:38,310
to the next lesson and let's get started.

