Video source link was not found

January 8, 2015 580 views


I have a problem with video source link.

On my website i have my own video player and i want to play movies in this player thats why I need video source link.

I have made script which retrieve video source url from html code. So I put this code and on field in my site then my script grabbed video source url to database and everything were fine. Video was playing on my video player.

After 3 hours I wanted do display this same movie from my site and then information appeared ‘The requested video is not found’.To see what happened, I went to this link myself and checked html code on browser. It turned out that the video source url was changed! From this first above to this If you put video source link to brower then appear ‘401 Forbidden nginx’. Before in this same link was playing video on player.

So thats mean they have some mechanism which generate links video source for every session or dynamically generate links with access token or it is part of some mechanism of server– I dont know.

1. I want to know what is that mechanism and how it called?
2. Is there possibilty to grab dynamically video source url to my site?

Its normal when I put video source url on my database its static and stored. But I was wondering about that, when someone click on my video to play then -> programming language will grab dynamically video source url from normal link like that and store it or database( ornot if not needed) -> video will play.

3. What tools and programming language should I use to do that script please give me advice and tips.

Thanks for any help :)

1 Answer

1.) I am not sure this has a name, at least not one in general use. This type of system is designed to prevent exactly what you're trying to do. Please check the terms of use of the site you're pulling from to ensure you are not violating their terms or the laws in the jurisdiction where you are, or in the US.

2.) The only way around this is to make a request with the public URL each time and scrape the updated video source URI. Having taken the other steps they did, the source of the video likely also will blacklist IPs that do this a lot.

3.) Any modern scripting language can be used to do this. Web scraping and url fetching is universally supported so this is simply a matter of preference.

Having answered your technical questions as best I can I do want to re-iterate, Do Not Do This. You are attempting to work around protections put in place to prevent exactly what you're trying to do. This is likely illegal under US law (which governs your agreement with DigitalOcean) and if it is either illegal under the laws of New York or against the terms of service of the site you are scraping you are likely to have your services suspended if an abuse complaint or DMCA is filed.

Have another answer? Share your knowledge.