I need to scrape a web page that has a javascript array embeded in inline javascript code, such as:
<script>
var videos = new Array();
videos[0] = 'http://myvideos.com/video1.mov';
videos[1] = ....
....
</script>
What’s the easiest way to approach this and end up with a PHP array of these video urls?
Edit:
All videos are .mov extension.
This is a bit more complicated, but it will get only those links, that are really of the form
videos[0] = 'http://myvideos.com/video1.mov';After feedback from the OP here is the simplified version: