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

Breaks when symbol doesn't exist #6

Open
Stono opened this issue Oct 5, 2016 · 1 comment
Open

Breaks when symbol doesn't exist #6

Stono opened this issue Oct 5, 2016 · 1 comment

Comments

@Stono
Copy link

Stono commented Oct 5, 2016

[ 'LON:VM', 'LON:BARC', 'LON:IDONTEXIST' ]

Unhandled rejection StatusCodeError: 400 - "<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"><title>Error 400 (Not Found)!!1</title><style>{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px;} > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}pre{white-space:pre-wrap;}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}</style><div id="af-error-container">

400. That’s an error.

The requested URL was not found on this server. That’s all we know."
at new StatusCodeError (/Users/kstoney/Development/stono/stocknet/sn.crawl.news/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/Users/kstoney/Development/stono/stocknet/sn.crawl.news/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback as _callback
at Request.self.callback (/Users/kstoney/Development/stono/stocknet/sn.crawl.news/node_modules/request/request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/Users/kstoney/Development/stono/stocknet/sn.crawl.news/node_modules/request/request.js:1044:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/Users/kstoney/Development/stono/stocknet/sn.crawl.news/node_modules/request/request.js:965:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:934:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

@thstarshine
Copy link

thstarshine commented Jan 8, 2017

Use request instead of request-promise at line 29 in lib/utils.js temprorarily solved this.
btw pipe streaming is discouraged when using request-promise, maybe the downloadRSS function could be written in another way?

var requestCb = require('request')
var req = requestCb(_.extend({
  uri: uri,
  qs: qs
}, optionalHttpRequestOptions));

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

2 participants