Given a url to a webpage which embeds a video (similar to youtube) how can I write an API (in any language) to send a request (http or any other) and find if the video is valid/broken (maybe by using return codes for the video stream) without actually visiting the page?
-
For example: A video might be removed for various reasons after adding..(like copyright issues/removed by user etc), without actually visiting this URL but by just having the link, is it possible to write an API using the http return codes to find out if the link is broken?? The best one I was able to find for a broken link example!!
-
Answer:
Youtube - currently - responds with 303 See Other and redirects to index. You could check for that with HEAD requests.
Simon Oberhammer at Quora Visit the source
Other answers
If the URL actually returns an error code (such as 401, 404, etc.) you could use the HTTP HEAD to determine if the document is available. In this case, YouTube returned 200 (success) with the content in the page saying that the video has been removed. So, unless you parse the page for known content or error text, you may not be able to determine if the video is actually present in the page or not.
Raghavendra Kidiyoor
Related Q & A:
- How can I write a good reference letter?Best solution by dailywritingtips.com
- How Can I Connect To The Internet On My Psp Using A USB Cable?Best solution by askdavetaylor.com
- How can I connect a printer wirelessly to my laptop without a router? Which printer would be the best?Best solution by Yahoo! Answers
- How can I write a free verse poem?Best solution by wikihow.com
- How can I write a really good mode?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.