title: I need to extract data from a webpage which is within a script tag using python
body: <p>The String I have contains</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){&quot;undefined&quot;!=typeof Symbol&amp;&amp;Symbol.toStringTag&amp;&amp;Object.defineProperty(e,Symbol.toStringTag,{value:&quot;Module&quot;}),Object.defineProperty(e,&quot;__esModule&quot;,{value:!0})},n.t=function(e,t){if(1&amp;t&amp;&amp;(e=n(e)),8&amp;t)return e;if(4&amp;t&amp;&amp;&quot;object&quot;==typeof e&amp;&amp;e&amp;&amp;e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,&quot;default&quot;,{enumerable:!0,value:e}),2&amp;t&amp;&amp;&quot;string&quot;!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&amp;&amp;e.__esModule?function(){return e.default}:function(){return e};return n.d(t,&quot;a&quot;,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=&quot;&quot;,n(n.s=1461)}({1461:function(e,t,n){&quot;use strict&quot;;window.OOKLA=window.OOKLA||{},window.OOKLA.INIT_DATA={&quot;result&quot;:{&quot;date&quot;:1174430405,&quot;id&quot;:&quot;102041099&quot;,&quot;download&quot;:160,&quot;upload&quot;:1071,&quot;latency&quot;:181,&quot;distance&quot;:1100,&quot;country_code&quot;:&quot;MX&quot;,&quot;server_id&quot;:292,&quot;server_name&quot;:&quot;Atlanta, GA&quot;,&quot;sponsor_name&quot;:&quot;One Ring Networks&quot;,&quot;sponsor_url&quot;:null,&quot;connection_mode&quot;:&quot;multi&quot;,&quot;isp_name&quot;:&quot;Universidad Autonoma de Nuevo Leon&quot;,&quot;isp_rating&quot;:&quot;3.5&quot;,&quot;test_rank&quot;:28,&quot;test_grade&quot;:&quot;D&quot;,&quot;test_rating&quot;:2,&quot;additional_servers&quot;:[],&quot;path&quot;:&quot;result\u002F102041099&quot;,&quot;hasSecondary&quot;:false}},window.OOKLA.globals={&quot;year&quot;:2021,&quot;jsPaths&quot;:{&quot;bundle&quot;:&quot;\u002Fjavascript\u002Fspeedtest-main.js?v=493de14e3a08befbca036fbced72e697&quot;,&quot;bundle.map&quot;:&quot;\u002Fjavascript\u002Fspeedtest-main.js.map?v=696e4652af79d58806aae60ed92c9ba3&quot;},&quot;cdnUrl&quot;:&quot;\u002F\u002Fb.cdnst.net&quot;,&quot;bundleUrl&quot;:&quot;\u002F\u002Fb.cdnst.net&quot;,&quot;hostSubdomain&quot;:&quot;&quot;,&quot;configs&quot;:{&quot;clientConfigOverride&quot;:{},&quot;linkToSt3&quot;:false,&quot;ads&quot;:true,&quot;lifetimeSubscriptionDate&quot;:&quot;2199-01-01 00:00:00&quot;,&quot;subscriptions&quot;:[],&quot;payments&quot;:{&quot;client&quot;:{&quot;apiKey&quot;:&quot;pk_live_KTgd89Iyw9JidRcjj41PBFAD007uzOUJpb&quot;,&quot;input_style&quot;:{&quot;base&quot;:{&quot;color&quot;:&quot;#ffffff&quot;,&quot;lineHeight&quot;:&quot;24px&quot;,&quot;fontSize&quot;:&quot;16px&quot;,&quot;::placeholder&quot;:{&quot;color&quot;:&quot;#aab7c4&quot;}},&quot;invalid&quot;:{&quot;color&quot;:&quot;#ff3366&quot;,&quot;iconColor&quot;:&quot;#ff3366&quot;}}}},
  </code></pre>
  <p>I want to extract only</p>
  <pre><code>&quot;date&quot;:1174430405,&quot;id&quot;:&quot;102041099&quot;,&quot;download&quot;:160,&quot;upload&quot;:1071,&quot;latency&quot;:181,&quot;distance&quot;:1100,&quot;country_code&quot;:&quot;MX&quot;,&quot;server_id&quot;:292,&quot;server_name&quot;:&quot;Atlanta, GA&quot;,&quot;sponsor_name&quot;:&quot;One Ring Networks&quot;,&quot;sponsor_url&quot;:null,&quot;connection_mode&quot;:&quot;multi&quot;,&quot;isp_name&quot;:&quot;Universidad Autonoma de Nuevo Leon&quot;,&quot;isp_rating&quot;:&quot;3.5&quot;,&quot;test_rank&quot;:28,&quot;test_grade&quot;:&quot;D&quot;,&quot;test_rating&quot;:2,&quot;additional_servers&quot;:[],&quot;path&quot;:&quot;result\u002F102041099&quot;,&quot;hasSecondary&quot;:false
  </code></pre>
  <p>How is this possible with Python? I tried with <code>re</code> and have been struggling for 2 days.</p>