title: how can I parse these data using beautiful soup?
body: <p>I'm trying to parse the data from all list contents in a page and store it in a set of dictionaries.
  A program that I tried</p>
  
  <pre><code>import re
  import pytz
  import requests
  import datetime
  from flask import url_for
  from bs4 import BeautifulSoup
  from urllib.parse import urljoin
  
  
  matchinfor_link = "http://www.espncricinfo.com/ci/engine/match/index.html?date=2018-03-12"
  
  r = requests.get(matchinfor_link)
  matchinfor_html = r.text
  
  soup = BeautifulSoup(matchinfor_html, "html.parser")
  
  
  details = soup.find("div",{"class":"matches-container"})
  matchinfor_dict = {}
  least = []
  
  count = 0
  for div in details:
      # try:
      #   details_div = div.find("div",{"class":"match-section-head"})
      # except TypeError:
      #   continue
      count+=1
      print(count)
      try:
           sww = div.find("div",{"class":"match-section-head"})
      except TypeError:
  
          name = sww.find("h2").text.strip()
          matchinfor_dict['name'] = name
          least.append(matchinfor_dict)
          matchinfor_dict = {}
  
  print(least)
  </code></pre>
  
  <p>I end up getting attribute error and type error, how can I parse the page content to get output</p>
  
  <p><strong>Expected output:</strong></p>
  
  <pre><code>[{'name':'Twenty20 Internationals','Date':'Mar 12, 2018', 'place':' 4th Match at R Premadasa Stadium, Colombo (night)','team1':'Sri Lanka','team2':'India', 'time':'Match scheduled to begin at 19:00 local time '....................}]
  </code></pre>