NickM-27 / LinkPreview

An easy to use library for showing a link preview
Apache License 2.0
49 stars 12 forks source link

Some links show..some don't #41

Open pmasonuh opened 2 years ago

pmasonuh commented 2 years ago

The following link does work (Any Yahoo Link): https://www.yahoo.com/sports/the-story-behind-the-famous-brett-favre-draft-day-jorts-photo-004308103.html

The following link does not work: https://abnb.me/40S5opfYcpb

But, this works: https://abnb.me

NickM-27 commented 2 years ago

Thanks, this would be due to the underlying library dependency on jsoup. Unfortunately some websites don't present the image in the usual places so jsoup is unable to parse that. It also seems to sometimes struggle with redirect URLs. I will take a look and see if there are any optimizations to make but I am not too sure there is much I can do here without changing to a different library for this purpose (or potentially using multiple).

pmasonuh commented 2 years ago

Thanks for the quick response. Yes please do see if there is anything you can do...I've looked around and your repo was the easiest to implement for Kotlin and looks great. I'm somewhat new to Kotlin, but if there is anything I can do to help let me know.