bookwyrm icon indicating copy to clipboard operation
bookwyrm copied to clipboard

Check HTTP status codes on file links

Open mouse-reeve opened this issue 3 years ago • 6 comments

When an edition has a link out to a copy of the book, it would be great to automatically check that the link isn't returning a 404 or error type status code. I think this can be a HEAD request. I'm not sure when the best time to do it is.

mouse-reeve avatar Jan 17 '22 16:01 mouse-reeve

Hello, I'll try and attempt this issue for you.

m1del avatar Jan 21 '22 20:01 m1del

Wonderful! Let me know if you need anything

mouse-reeve avatar Jan 21 '22 20:01 mouse-reeve

Hello! So I've came up with a python class to check for link status, however, I can't seem to locate where to add this class? Can you point me to where the link requests are being handled? Thanks.

m1del avatar Jan 31 '22 21:01 m1del

I think you're looking for the django view for adding links: https://github.com/bookwyrm-social/bookwyrm/blob/main/bookwyrm/views/books/links.py#L68. Does that help clarify?

mouse-reeve avatar Feb 01 '22 20:02 mouse-reeve

Hi @m1del, do you still work on a solution? While working on issue #1850 and #1899, I also got the idea how to include a solution to this issue. If you want, I can show you my approach.

willhoh avatar Feb 04 '22 18:02 willhoh

Hi, I'm from Codeday and I want to work on this issue.

Robel-003 avatar Jan 26 '24 21:01 Robel-003