Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error fetching market #25

Closed
troublew opened this issue Oct 9, 2016 · 7 comments
Closed

Error fetching market #25

troublew opened this issue Oct 9, 2016 · 7 comments

Comments

@troublew
Copy link

troublew commented Oct 9, 2016

"Error fetching market data... 10:10:02pm PST
Unable to parse http://money.cnn.com/data/markets/"

Hie, when I execute mop, I cannot see the upper banner...
Thanks you.

@cjc343
Copy link
Contributor

cjc343 commented Oct 10, 2016

#24 fixes this error for the time being.

The current scraping code uses regex that expects to find the elements in a specific order. That order changed.

@troublew
Copy link
Author

troublew commented Oct 10, 2016

Maybe am I doing something wrong, but your fork don't work for me... The same error appears again. Do it works for you?
I just want a tool alloying me to check the currencies, the state of the gold price, the market state quickly from the command line...
Thanks.

@cjc343
Copy link
Contributor

cjc343 commented Oct 10, 2016

Yes, if I'm using my fork, it works for me. If the following steps don't work for you, it's possible that the cnn market data page returns differently based on some factor such as geo, in which case you would need to tailor the regex to whatever format you receive.

In short:

go get github.com/mop-tracker/mop
cd $GOPATH/src/github.com/mop-tracker/mop
git remote add cjc343 https://github.com/cjc343/mop
git pull cjc343
git merge cjc343/master
make install

@troublew
Copy link
Author

It works now after I followed your tutorial.
I did "go get -u github.com/cjc343/mop" before without success.
Thanks a lot!

@mig281
Copy link
Contributor

mig281 commented Apr 5, 2017

Hi...so the latest version of Mop (aside from all the issues as a result of the repo move still sitting in unmerged PRs) still doesn't work without the fix proposed above. Are there any plans to fix this? 😃

@muammar
Copy link

muammar commented Dec 14, 2017

Thanks for these patches. I am getting this error:

Dow -0.19% (-46.66) at 24,538.77 S&P 500 -0.29% (-7.73) at 2,655.12 NASDAQ -0.21% (-14.66) at 6,861.14                                                                                                3:11:42pm PST
Tokyo -0.28% (-63.44) at 22,694.45 HK -0.19% (-55.61) at 29,166.38 London -0.65% (-48.08) at 7,448.12 Frankfurt -0.44% (-57.31) at 13,068.08
10-Year Yield 2.35% (-0.00) Euro $1.18 (+0.02%) Yen ¥112.17 (-0.59%) Oil $57.07 (+0.83%) Gold $1,257.70 (+0.73%)

Error fetching stock quotes...
runtime error: index out of range

@cjc343
Copy link
Contributor

cjc343 commented Dec 15, 2017

#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants