logstash-plugins / logstash-input-twitter

Apache License 2.0
28 stars 33 forks source link

Support $ symbol #14

Open mavencode01 opened 9 years ago

mavencode01 commented 9 years ago

I can't seems to use twitter stock symbol on logstash twitter input. It throws exception if I tried to use the $ sign

input {
 twitter {
        # add your data
        consumer_key => "*******************"
        consumer_secret => "*******************"
        oauth_token => "***********************"
        oauth_token_secret => "***********************"
        keywords => ["AAPL"]
        full_tweet => true
    }
}

I need to filter only the stock related tweets in the keywords

keywords => ["$AAPL"]

This shows up in my console if I tried to user the $ symbol in the keywords

5/lib/logstash/inputs/twitter.rb:88:inrun'", "/home/user11/opt/tools/logstash-1.5.0.rc2/lib/logstash/pipeline.rb:174:in inputworker'", "/home/user11/opt/tools/logstash-1.5.0.rc2/lib/logstash/pipeline.rb:168:instart_input'"], :level=>:warn} {:exception=>Twitter::Error::Unauthorized, :backtrace=>["/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/response.rb:21:in on_headers_complete'", "org/ruby_http_parser/RubyHttpParser.java:370:in<<'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/response.rb:16:in <<'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/connection.rb:22:instream'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/client.rb:116:in request'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/client.rb:36:infilter'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-0.1`

Is there a way around this ?

fernandabruno commented 9 years ago

I am having the same problem with @something. Already tried \@something, %@something and I am getting the same error.

jasonrhaas commented 9 years ago

+1 for $