Created
November 26, 2009 14:13
-
-
Save sugyan/243478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/bin/perl | |
use strict; | |
use warnings; | |
use Config::Pit; | |
use Date::Parse 'str2time'; | |
use Net::Twitter; | |
my $nt = Net::Twitter->new(%{pit_get( | |
"twitter.com", | |
require => { | |
"username" => "your username on twitter", | |
"password" => "your password on twitter", | |
}, | |
)}); | |
my %result = (); | |
for my $page (1..5) { | |
my $mentions = $nt->mentions({ | |
count => 200, | |
page => $page, | |
}); | |
for my $status (@$mentions) { | |
my @date = localtime str2time($status->{created_at}); | |
next if $date[4] != 10; | |
$result{$date[3]}++; | |
} | |
} | |
print "$_: $result{$_}\n" for sort { $a <=> $b } keys %result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1: 14 | |
2: 6 | |
3: 11 | |
4: 15 | |
5: 20 | |
6: 28 | |
7: 11 | |
8: 27 | |
9: 44 | |
10: 38 | |
11: 26 | |
12: 16 | |
13: 45 | |
14: 32 | |
15: 33 | |
16: 35 | |
17: 39 | |
18: 27 | |
19: 21 | |
20: 18 | |
21: 20 | |
22: 6 | |
23: 10 | |
24: 22 | |
25: 16 | |
26: 171 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment