title: Scraping csv file from url with React script
body: <p>I want to scrape <strong>sample_info.csv</strong> file from <a href="https://depmap.org/portal/download/" rel="nofollow noreferrer">https://depmap.org/portal/download/</a>.
  Since there is a React script on the website it's not that straightforward with BeautifulSoup and accessing the file via an appropriate tag. I did approach this from many angles and the one that gave me the best results looks like this and it returns the executed script where all downloaded files are listed together with other data. My then idea was to strip the tags and store the information in JSON. However, I think there must be some kind of mistake in the data because it is impossible to store it as JSON.</p>
  <pre><code>url = 'https://depmap.org/portal/download/'
  html_content = requests.get(url).text
  soup = BeautifulSoup(html_content, &quot;lxml&quot;)
  all_scripts = soup.find_all('script')
  script = str(all_scripts[32])
  last_char_index = script.rfind(&quot;}]&quot;)
  first_char_index = script.find(&quot;[{&quot;)
  script_cleaned = script[first_char_index:last_char_index+2]
  script_json = json.loads(script_cleaned)
  </code></pre>
  <p>This code gives me an error
  <strong>JSONDecodeError: Extra data: line 1 column 7250 (char 7249)</strong>
  I know that my solution might not be elegant but it took me closest to the goal i.e. downloading the <strong>sample_info.csv</strong> file from the website. Not sure how to proceed here. If there are other options? I tried with selenium but this solution will not be feasible for the end-user of my script due to the driver path declaration</p>