Skip to content

Instantly share code, notes, and snippets.

@UniBreakfast
Last active February 17, 2019 09:38
Show Gist options
  • Save UniBreakfast/eb49cb9a003ede207b985883dd6272f7 to your computer and use it in GitHub Desktop.
Save UniBreakfast/eb49cb9a003ede207b985883dd6272f7 to your computer and use it in GitHub Desktop.
get the link from temp1
function get(temp) {
var text = temp.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.children[1].innerText,
end = text.search('","cdn":"akamai_interconnect","quality":"720p')+1 || text.search('","cdn":"fastly","quality":"720p')+1,
begin = text.substring(0,end).lastIndexOf('https')
return text.substring(begin,end-1)
}
get(temp1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment