From 0ae495157c3f7e8d75bac7f6dc02bb3995cb09ea Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 20 Apr 2012 13:42:35 -0400 Subject: [PATCH] removing this, going to replace with factoid --- plugins/tfw.pm | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 plugins/tfw.pm diff --git a/plugins/tfw.pm b/plugins/tfw.pm deleted file mode 100644 index 18f81c3..0000000 --- a/plugins/tfw.pm +++ /dev/null @@ -1,33 +0,0 @@ -use strict; -use HTML::TreeBuilder; -use LWP::Simple qw/get/; - -sub { - my( $said ) = @_; - - my $location = $said->{body}; - - my $resp = get( "http://thefuckingweather.com/?zipcode=$location" ); - - my $tree = HTML::TreeBuilder->new_from_content( $resp ); - - my $body = $tree->look_down( _tag => 'body' ); - - my @elements = $body->content_list; - - my $location = $elements[0]; - my $weather = ($elements[1]->content_list)[0]; - my $remark = $tree->look_down( id => 'remark' ); - - my $weathertext = $weather->as_text; - $weathertext =~ s/\n/ /g; #filter them so when it goes ITS FUCKING NICE\nAND THUNDERING it'll display properly - $weathertext =~ s/\?\!/?! /g; - my $remarktext = $remark->as_text; - $remarktext =~ s/\n/ /g; - - print $location->as_text; - print " "; - print $weathertext; - print " "; - print '(', $remarktext, ')'; -}