title: python BeautifulSoup Wikipedia Webscapping -learning
body: <p>I learning Python and BeautifulSoup</p>
  <p>I am trying to do some webscraping:</p>
  <p>Let me first describe want I am trying to do?</p>
  <p>the wiki page: <a href="https://en.m.wikipedia.org/wiki/List_of_largest_banks" rel="nofollow noreferrer">https://en.m.wikipedia.org/wiki/List_of_largest_banks</a></p>
  <p>I am trying to print out the</p>
  <pre><code>&lt;span class=&quot;mw-headline&quot; id=&quot;By_market_capitalization&quot; tabindex=&quot;0&quot; role=&quot;button&quot; aria-controls=&quot;content-collapsible-block-1&quot; aria-expanded=&quot;true&quot;&gt;By market capitalization&lt;/span&gt;
  </code></pre>
  <p>I want to print out the text: <code>By market capitalization</code></p>
  <p>Then the text of the table of the banks:
  Example:
  By market capitalization</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: right;">Rank</th>
  <th style="text-align: left;">Bank</th>
  <th style="text-align: left;">Cap Rate</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: right;">1</td>
  <td style="text-align: left;">JP Morgan</td>
  <td style="text-align: left;">466.1</td>
  </tr>
  <tr>
  <td style="text-align: right;">2</td>
  <td style="text-align: left;">Bank of China</td>
  <td style="text-align: left;">300</td>
  </tr>
  </tbody>
  </table>
  </div><hr />
  <p>all the way to 50</p>
  <p>My code starts out like this:</p>
  <pre><code>from bs4 import 
  import requests 
              
  html_text = requests.get('https://en.wikipedia.org/wiki/List_of_largest_banks').text
  soup = BeautifulSoup(html_text, 'lxml')
  # text = soup.find('span', class_='mw-headline', id='By_market_capitalization').text 
  Ak_soup = soup.find_all('section', class_='mf-section-2 collapsible-block open-block', id='content-collapsible-block-1')
  print(Ak_soup) 
  </code></pre>
  <p>I believe my problem is more on the html side of things:
  But I am completely lost:
  I inspected the element and the tags that I believe to look for are</p>
  <pre><code>{section class_='mf-section-2 collapsible-block open-block'}
  </code></pre>