Comments (4)
Hello!
This is behavior more related with the impossibility to scrape certain websites.
The component is doing an API call like this:
https://api.microlink.io/?url=https://www.google.de/search?q=hello+world
It "looks that doesn't work" because many sites (like Google, LinkedIn, etc) disable GET petitions that they detected that they are not real users.
However, you can make something tricky: Enable prerender feature. It performs a smart call like a browser.
The API call looks like:
https://api.microlink.io/?url=https://www.google.de/search?q=hello+world&prerender
and magic! your expected data is here 😄
Currently microlink free API endpoint doesn't use prerender
by default because it bloats the server. You can enable it, but because it consume more CPU and the response time is higher, it is not enabled by default (contact us for use a pro plan!)
On the other hand, we can add a prerender
option into microlink.js to enable make API call with prerending enabled:
<MicrolinkCard url='https://github.com' prenreder />
So I'm going to keep this issue open until we added it (probably this week).
from sdk.
Hi @Kikobeats
Thanks a lot, this helps! Looking forward to the option you will add :)
from sdk.
Will be shipped at 1.2.0
.
from sdk.
Works like a charm, thank you!
from sdk.
Related Issues (20)
- Page freezing in Angular HOT 15
- Ensure to log fetch errors HOT 2
- Ensure Microsoft Edge compatibility
- microlink.io is down? HOT 1
- Separate `fetch` from `setData`
- Make embeds clickable while loading HOT 1
- [vue] Can't perform a React state update on an unmounted component HOT 1
- [hover-react] testing snapshot fails
- A better way to customize basic style
- Add a way to pass iframe options HOT 2
- Links to documentation and storybook don't work
- Storybook link down HOT 1
- Styling of card loader HOT 8
- it fails for some websites that need to accept cookies HOT 5
- Microlink Hover improvements
- Is using raw `video` urls / mp4's legal in the preview? HOT 2
- apikey being passed to the Iframe wrapper component HOT 2
- Crashed with invalid link HOT 4
- Cors on any link HOT 1
- Running React v17 won't compile - @microlink/react gives an error about needing an additional loader in (MicrolinkError) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.