michaeldv / market_beat Goto Github PK
View Code? Open in Web Editor NEWGem to fetch up-to-date stock quotes and other market data
License: Other
Gem to fetch up-to-date stock quotes and other market data
License: Other
I got this error when running:
require 'market_beat'
MarketBeat.opening_price :AAPL
REXML::ParseException: #<REXML::ParseException: Missing end tag for 'meta' (got "HEAD")
Line: 2
Position: 117
Last 80 unconsumed characters:
>
/Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:335:in `pull_event'
/Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:183:in `pull'
/Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse'
/Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/document.rb:243:in `build'
/Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/market_beat-0.2.0/lib/market_beat/google.rb:38:in `new'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/market_beat-0.2.0/lib/market_beat/google.rb:38:in `from_xml'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/market_beat-0.2.0/lib/market_beat/google.rb:21:in `block (2 levels) in singletonclass'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/market_beat-0.2.0/lib/market_beat.rb:26:in `method_missing'
(pry):3:in `__pry__'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:328:in `eval'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:328:in `evaluate_ruby'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:278:in `re'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:254:in `rep'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:232:in `loop'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:231:in `catch'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:231:in `block in repl'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:230:in `catch'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_instance.rb:230:in `repl'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/pry_class.rb:169:in `start'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-debugger-0.2.2/lib/pry-debugger/pry_ext.rb:19:in `start_with_pry_debugger'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/cli.rb:201:in `block in <top (required)>'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `call'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `block in parse_options'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `each'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/lib/pry/cli.rb:70:in `parse_options'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/gems/pry-0.9.12.6/bin/pry:16:in `<top (required)>'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/bin/pry:19:in `load'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/bin/pry:19:in `<main>'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/w1zeman1p/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
...
Missing end tag for 'meta' (got "HEAD")
Line: 2
Position: 117
Last 80 unconsumed characters:
Line: 95
Position: 117
Last 80 unconsumed characters:
from /Users/w1zeman1p/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:95:in `rescue in parse'
Hi,
When experimenting with stocks of the Brazilian market, I found out that MarketBeat won't find information about them, even though it's available in Yahoo! Finance.
This happens because market_beat.rb
only checks if the query model is available in each provider, not the actual data being queried. As in both Yahoo and Google have the opening_price
query, however only Yahoo has the data for Brazilian stocks.
The easy fix is to swap Yahoo and Google, because Yahoo has more information, therefore should be priority. But I don't like this fix, as there could be data that's not available on the main provider.
PS: MarketBeat is still awesome :)
-Bruno
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.