medialab / sandcrawler

sandcrawler.js - the server-side scraping companion.
http://medialab.github.io/sandcrawler/
GNU Lesser General Public License v3.0
107 stars 12 forks source link

not a valid language tag #191

Open ToruHyuga opened 8 years ago

ToruHyuga commented 8 years ago

Hello, I have some problem with sandcrawler Phantom Spider. I tried to use this code:

var sandcrawler = require('sand crawler')
var spider = sandcrawler.phantomSpider()
            .url('https://news.ycombinator.com');
sandcrawler.run(spider, function(error, data) {
    if(error) {
        console.log(error);
    } else {
        console.log(data);
    }
});

And some other examples from here But always had the same error:

events.js:146
throw err;
^

Error: Uncaught, unspecified "error" event. (Fontconfig warning: ignoring C.UTF-8: not a valid language tag
)
at Spy.emit (events.js:144:17)
at Socket. (/home/ubuntu/node_modules/sandcrawler/node_modules/bothan/src/spy.js:85:10)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:529:20)

Can someone help me please?

Yomguithereal commented 8 years ago

Hello @ToruHyuga. Which version of node do you use?

ToruHyuga commented 8 years ago

@Yomguithereal Hello, I user this one $ node -v v4.4.0