e-oj / grabity Goto Github PK
View Code? Open in Web Editor NEWGenerate link previews from pages with Open Graph or Twitter Cards markup. Just grab it! ๐ฃ
Home Page: https://www.npmjs.com/package/grabity
License: MIT License
Generate link previews from pages with Open Graph or Twitter Cards markup. Just grab it! ๐ฃ
Home Page: https://www.npmjs.com/package/grabity
License: MIT License
๐
I'm getting this error when im trying to access wikipedia, facebook or instagram(not account links, just the link to the website) links using this module. What is the actual issue here and is there any workaround for this?
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.
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).
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)
It works nicely for all other urls but for youtube, it doesn't work. Any reason why? thanks
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.
I am not able to use grabity due to the error 'too many requests'. I have not seen this anywhere and am wondering what is going on.
Failed to minify the code from this file:
./node_modules/grabity/node_modules/jsdom/lib/jsdom/living/generated/utils.js:73
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.