• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Check dead links and ask users to correct their media links

Alfa1

Well-known member
#1
Media links often go dead in time. Especially on youtube, etc.
It would be useful if XFMG would periodically check for dead links and Alert the authors/members that their video link is no longer available and ask them to find a replacement URL.
This way the webmaster doesn't end up with a mass of dead links to fix and the community will fix most of the problem itself.
 

Fred.

Well-known member
#2
I agree, just noticed that I have a lot of broken links in there.

A list with dead links for the admin would also be good. So it can be fixed.
 

Chris D

XenForo developer
Staff member
#3
I think this was suggested a few years ago and I "Not Planned" it then. I will keep an open mind about it, for now, but I think it's worth noting there's a technical challenge in identifying whether a video is "dead" or not.

For example if you take a YouTube URL that doesn't exist:
https://youtu.be/AFAKEURL123

YouTube doesn't actually identify that as a dead URL in the HTTP response. You would usually expect a 404 not found response, but instead it sends a 200 ok response.

This would leave us doing potentially complex scraping or having to use the YouTube API (if it even helps - it may not) - neither options are particularly preferable.
 

Fred.

Well-known member
#4
Ok, In that case I understand it's a technical challenge. Youtube should send a 404 response!
I hope youtube will change this in the future, otherwise YouTube API might be the better option.
 

Chris D

XenForo developer
Staff member
#5
That's assuming the YouTube API is able to indicate the status of a video more correctly. If the website itself doesn't, maybe the API doesn't either. But something to consider at least.
 

Alfa1

Well-known member
#6
It's something to check out. YouTube has begun monetizing on heavy users of their API's. So hopefully the do flesh out the API in return.
In the YouTube Data API v3 the function 'youtube.videos.list' with the parameter 'id' will allow you to call a specific video. If the result is empty or has an error code then I would assume it is dead.
 

Mike Fara

Active member
#7
Unbelievably, over a year later and this is still a problem with YouTube. Now these videos, which are getting taken down, are sending a 301 Moved Permanently and not a 404. All the while, AdSense went haywire on me and started saying I was conducting "Misleading advertising" because a bunch of political videos got taken down on an off-topic area of my site. Not just a bunch... but A LOT! I have been spending hours going through them, and not exactly having a good time doing it. Without the ability to re-check embeds, this is potentially an enormous problem (And not just in the media gallery area!).