sissbruecker / linkding

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.
https://linkding.link/
MIT License
6.78k stars 322 forks source link

web_archive_snapshot_url not showing up in REST API #885

Open quanganhdo opened 1 month ago

quanganhdo commented 1 month ago

I enable Internet Archive integration in my Settings and have access to the archived URLs by hovering the timestamp in the Dashboard, but am not sure why web_archive_snapshot_url is empty for all my links. The Django admin also doesn't show the snapshot URLs.

Did I overlook anything? Thanks.

(I'm running 1.36.0 on railway)

sissbruecker commented 1 month ago

Since 1.31.1 the UI will dynamically generate a "fallback" link to the web archive if no specific snapshot URL is stored in the bookmark. But that is not the case for the API currently. I guess it should.

For some background: In general, new snapshots on the IA are only created when you add a single bookmark, either via the UI or the API. It doesn't create snapshots for bookmarks that you have imported though. I removed that functionality as that created a large number of background tasks which then consistently failed due to rate limiting with the web archive API. It also didn't make sense to generate, and then link to, a snapshot from a website in it's current form if the bookmark was added two years ago. So instead it just generates a dynamic link to a snapshot from the time the bookmark was created, and then the IA will usually show you the nearest one. Worst case no snapshot exists but that should be rare.

I guess your issue is with bookmark that were imported then? Otherwise something would be wrong with background tasks, then you could check background_tasks.log for errors.

quanganhdo commented 1 month ago

Makes sense. Indeed I imported loads of links into Linkding for a test drive.