Get link contained in a JS script

0

I need to create a function that finds and put the value of a link contained in a javascript in a variable for another function to use that variable later.

Let's look at the real example:

The code is contained within a TAG "script" belonging to an "iframe". Iframe code:

<iframe class="embed-responsive-item" src="https://player.vimeo.com/video/163969741?autoplay=true"frameborder="0" allowfullscreen=""></iframe>

I need to find the following information inside this "iframe":

{"profile":164,"width":640,"mime":"video/mp4","fps":30,"url":"https://gcs-vimeo.akamaized.net/exp=1507047701~acl=%2A%2F519593631.mp4%2A~hmac=781e23a73042594f4bf64f28d21e5c59171367a3bbcf0753a578d2be56cbd7e9/vimeo-prod-skyfire-std-us/01/2793/6/163969741/519593631.mp4","cdn":"akamai_interconnect","quality":"360p","id":519593631,"origin":"gcs","height":360}

And then treat this information so that it is only the:

https://gcs-vimeo.akamaized.net/exp=1507047701~acl=%2A%2F519593631.mp4%2A~hmac=781e23a73042594f4bf64f28d21e5c59171367a3bbcf0753a578d2be56cbd7e9/vimeo-prod-skyfire-std-us/01/2793/6/163969741/519593631.mp4

This is the site where the true iframe is: link

    
asked by anonymous 03.10.2017 / 17:38

0 answers