title: Scape gtag/jquery variables with BeautifulSoup?
body: <p><strong>TL/DR - How to I get the price value from the code at the bottom of this post? ( 'price': '124.99', )</strong></p>
  <p>Hello I am trying to create a python <strong>scraper</strong> and I have the code below from following tutorials:</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  URL = ''
  
  headers = {
  &quot;User-Agent&quot;: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 Edg/93.0.961.44'}
  
  page = requests.get(URL, headers=headers)
  soup = BeautifulSoup(page.content, 'html.parser')
      
  print(soup.prettify())
  </code></pre>
  <p>The print returns a lot but the variable I am trying to parse appears like this:</p>
  <pre><code> &lt;!-- WooCommerce JavaScript --&gt;   &lt;script type=&quot;text/javascript&quot;&gt;    jQuery(function($) {
  
                          $( '.single_add_to_cart_button' ).on( 'click', function() {  
  </code></pre>
  <p>..... skip 50+ lines</p>
  <pre><code>                    $( '.products .post-4381 a' ).on('click', function() {
                              if ( true === $(this).hasClass( 'add_to_cart_button' ) ) {
                                      return;
                              }
                              gtag( 'event', 'select_content', {
                                      'content_type': 'product',
                                      'items': [ {
                                              'id': '4381',
                                              'name': 'Broad Spectrum',
                                              'category': 'Tanning Oil&amp;amp; Isolates',    
                                           'list_position': '9'
  
                                      } ], y': 'Oil/&amp;amp; ',
                                      'price': '124.99',
                              } ]
                      } );
  </code></pre>
  <p>How would I extract the <strong>price</strong> value from here? It is the only thing named price on this page</p>