Search code examples
javascriptgoogle-chromegoogle-chrome-extensionvimeo

How to download HTML page for temporary use with chrome extension



I'm working on chrome extension for getting a direct link of video from vimeo.
So far I can make (?content?) script, where I can get ID from URL link, but there is problem, now I need to download page with ID from http://player.vimeo.com/video//config and after I will get it I need to parse it with regex (this should not be problem). So main problem is download a page temporarily .
I'm new in making extensions so I don't really know if content script is a good way to start. Is it good practice to have different content scripts for different pages (like one for vimeo, one for tedtalks for example) or should I do it in one script? Thanks in advance


Solution

  • IMHO, this type of apps are better built using a server behind the scene that will process those urls. You can build them using PHP/Python/whatever you want to use. You can do caching, etc there too.

    The decision if it's going to be Server or a Chrome app is up to you. I tried it both but ended with Server as its codebase is more manageable then and no need to keep updating the chrome app when video sites changes their algorithm which might happen frequently.

    On the other hand though an advantage of building this using Chrome extension is that you may be able to access loggedin user's videos, or IP restricted videos etc

    This is my opinion from my experience of doing previous apps before few years back. I was getting direct link videos for 7 popular video sites then and they keep changing their get_dl algos.

    Have fun coding this challenging project :)