Giter Club home page Giter Club logo

grabity's Introduction

grabity's People

Contributors

coolandsolo avatar e-oj avatar joshfarrant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

grabity's Issues

Doesn't work on some websites and crashes the app

Hey,
I'm using grabity for my chat to preview the URL.
But for Facebook or Instagram, it doesn't work and crashes the app.
Here is my code that I call in ajax:

.get("/og-data", async(req, res)=>{
    const data = await grabity.grabIt(req.query.url);
    res.json(data)
})

Like I said when I use this for Flickr and a lot of author websites it works, but for Facebook, Instagram and I think others it doesn't work and I get this error that crashes the app:

Assertion failed: new_time >= loop->time, file c:\ws\deps\uv\src\win\core.c, line 309
[nodemon] app crashed - waiting for file changes before starting...

Someone help please it's really important for me.

Don't print CSS parsing errors to stderr

grabity.grab('https://twitter.com/Google/status/933736034726240258')

Output (stderr):

Error: Could not parse CSS stylesheet
    at exports.evaluateStylesheet (/private/tmp/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js:18:21)

I don't understand yet why this module requires jsdom (I expect it could just parse an HTML file with other tools, rather than using jsdom which also tries to parse CSS and so on).

Failed to minify

Failed to minify the code from this file:

./node_modules/grabity/node_modules/jsdom/lib/jsdom/living/generated/utils.js:73 

Youtube urls don't work

It works nicely for all other urls but for youtube, it doesn't work. Any reason why? thanks

Does not work with Twitter

Hello.
Code does not work with Twitter because Twitter response that ruquest was send from old browser.
I think this is the reason why script crashes.

Add favicon URL to grabbed data

Is there any technical reason why this can't be implemented?

I'm more than happy to take a look myself and submit a PR, if you'd be happy for favicons to be included in the grabbed data.

Error when adding your library

Is there a syntax error in your code?
Detailed stack trace: /user_code/node_modules/grabity/lib/grabity.js:17
exports.grabIt = async (url) => {
^

SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/user_code/node_modules/grabity/index.js:6:18)

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.