0

I am Working to Create a Youtube Video Downloading Extension Based on JS

I have extracted the link of youtube videos. But the problem comes when I want to access the variables on youtube page with the extension but I cannot read the variables. The Js variables being used by the WEB page in Script elements .

I am totally new in Chrome Extension developing. If you can help me in this it would be great.

Thanks!

  • What variables are you talking about? – Celsiuss Mar 31 '20 at 10:38
  • The Js variables being used by the WEB page in Script elements – SAAD QAYYUM Mar 31 '20 at 10:44
  • Does this answer your question? [Chrome Extension: Get Page Variables in Content Script](https://stackoverflow.com/questions/3955803/chrome-extension-get-page-variables-in-content-script) – Gergely Szabo Mar 31 '20 at 10:58
  • thanks everyone but i solved it using eval method. – SAAD QAYYUM Mar 31 '20 at 11:24
  • I used another method to get the variables from that specific script tag... var y = document.getElementsByName('body') ; var a = document.getElementById("player") ; var b = a.getElementsByTagName("script") ; var c = b[1].innerText ; var link = " " ; eval(c) ; i used this method to use the variables of script tag in content script – SAAD QAYYUM Mar 31 '20 at 11:24

0 Answers0