title: extracting javascript rendered data from a web page
body: <p>What i need to accomplish in the end is </p>
  
  <p>A. send a url to the form on this page: youtube-mp3.org </p>
  
  <p>B. get the scr attribute of a link on the resulting page. </p>
  
  <p>I'm  using Ruby on Rails and tried this method to send the request and get the body of the resulting page:  </p>
  
  <pre><code>require 'uri'
  yt_uri = URI('http://www.youtube-mp3.org')
  params = { :id =&gt; "youtube-url" , :value =&gt; "http://www.youtube.com/watch?v=KMU0tzLwhbE" }
  yt_uri.query = URI.encode_www_form(params)
  res = Net::HTTP.get_response(yt_uri)
  res.body
  </code></pre>
  
  <p>and it works fine but the problem is that the website uses javascript to render the link so it is not showing up in the source. Instead I get </p>
  
  <pre><code>&lt;noscript&gt;
    &lt;div class="warning"&gt;You have to enable JavaScript to use this Service!&lt;/div&gt;
  &lt;/noscript&gt;
  </code></pre>
  
  <p>is there a way around this. Im open to any suggestions</p>