Code Monkey home page Code Monkey logo

Comments (4)

Kikobeats avatar Kikobeats commented on July 19, 2024

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.

ayalpani avatar ayalpani commented on July 19, 2024

Hi @Kikobeats

Thanks a lot, this helps! Looking forward to the option you will add :)

from sdk.

Kikobeats avatar Kikobeats commented on July 19, 2024

Will be shipped at 1.2.0.

from sdk.

ayalpani avatar ayalpani commented on July 19, 2024

Works like a charm, thank you!

from sdk.

Related Issues (20)

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.