Giter Club home page Giter Club logo

metaget's People

Contributors

danish1994 avatar dependabot[bot] avatar mrvautin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

metaget's Issues

Publish latest to npm

Will you be publishing latest code to npm? I just came on here to put in a PR to fix the error condition but I see it was already fixed. We keep running into this case where the app crashes because response.statusCode is undefined.

Thanks

Problems with utf-8

Hello, I'm having trouble getting the metadata..
The problem happens when I try to get the data from this url:

This is the answer I get:

"title":"Estrela cadente? Nasa diz que asteroide gigante passar� pr�ximo � Terra logo ap�s o Natal","description":"N�o h� perigo de colis�o"

I am trying to solve this problem for hours, and I believe it is related to request or cheerio.

I tried some solutions that I found in stack overflow, one of them was using iconv-lite
I used it like this:

var body1 = iconv.decode(body, 'ISO-8859-1');
var $ = cheerio.load(body1);

I also addedencoding: null to the options object.

After doing this, I get the data the way I would like:

"title":"Estrela cadente? Nasa diz que asteroide gigante passará próximo à Terra logo após o Natal","description":"Não há perigo de colisão"

However if i try to get the data from this url i have problems again...

This is the answer I get:

"title":"Dez eletrônicos curiosos lançados pela Xiaomi em 2019","description":"Empresa chinesa se destacou pela variedade de dispositivos anunciados em 2019"

If I undo all the changes I made I get the expected answer:

"title":"Dez eletrônicos curiosos lançados pela Xiaomi em 2019","description":"Empresa chinesa se destacou pela variedade de dispositivos anunciados em 2019"

Could you help me fix this? I have no idea how to solve this problem, my knowledge of javascript is very limited, I'm a mobile developer and sometimes I need to do something with javascript in my backend.
I have been using this module for several months and only now have I noticed the problem.

Error if website not responding

if the website not responding get the following error "cannot read statusCode of undefined"

This error come from :
callback(new Error('Bad Request' + response.statusCode)); (line 55 in index.js)

since the response is undefined can't acces to statusCode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.