title: How to Web scraping SEC Edgar 10-K Dynamic data
body: <p>we are trying to parse SEC Edgar filing using Python .
  I'm trying to get this table &quot;Sales By Segment Of Business&quot;  at line 21  .
  This is the link to the document.</p>
  <pre><code>https://www.sec.gov/ix?doc=/Archives/edgar/data/200406/000020040621000057/jnj-20210704.htm
  </code></pre>
  <p>Below is the code we found online .
  All the data in the  web page is  under this tag .</p>
  <pre><code>&lt;div id=&quot;dynamic-xbrl-form&quot; class=&quot;position-relative&quot;&gt;
  </code></pre>
  <p>We are not able to print this data .</p>
  <p><a href="https://i.stack.imgur.com/K5kJ7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K5kJ7.png" alt="enter image description here" /></a></p>
  <pre><code>from bs4 import BeautifulSoup
  import requests
  import sys
  
  # Access page
  cik = '200406'
  type = '10-K'
  dateb = '20210704'
  
  # Obtain HTML for search page
  base_url = &quot;https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&amp;CIK={}&amp;type={}&amp;dateb={}&quot;
  edgar_resp = requests.get(base_url.format(cik, type, dateb))
  edgar_str = edgar_resp.text
  
  # Find the document link
  doc_link = ''
  soup = BeautifulSoup(edgar_str, 'html.parser')
  print(soup)
  </code></pre>
  <p>Can anyone help us in getting this . Any suggestion is helpful.</p>