sur950 / any_link_preview

A flutter Plugin/Package to show the preview of any web link that starts with HTTP/HTTPS. Mostly useful for application that had chat.
MIT License
70 stars 70 forks source link

Use client side render only as a backup if default result is empty #41

Closed LeGoffMael closed 1 year ago

LeGoffMael commented 1 year ago

Fixes #38.

Using Googlebot as user agent by default causes issue on some links. For example, instagram redirects to login page after few anonymous requests which causes all the preview to be blocked.

This PR uses the Googlebot as user agent as a backup ONLY if the default HTTP request result with no user-agent specified is empty.

Before PR After PR
IMG_1970 IMG_5EA17CC360F5-1
sur950 commented 1 year ago

Hi, Thanks for the PR. This looks cool. However, a minor refactoring is required which I can close in my local