title: Python: Is my except clause indeed too broad?
body: <p>My code is working fine, but PyCharm warns about the <code>except</code> clause in the following being too broad. And honestly, it also smells to me as the wrong implementation.</p>
  
  <p>When scraping HTML<code>&lt;tr&gt;</code>s in bulk, which I also have to add to the database or update, I don't know in advance if a game is finished or not. Also, a game that hasn't been finished has different HTML tags in some <code>&lt;td&gt;</code>s, that require different handling.</p>
  
  <p>Basically, if we look at <code>match_score_string</code> and <code>match_relevant_bit</code> we are telling BeautifulSoup to find a <code>&lt;td&gt;</code> with a certain class. If the game is finished already, this <code>&lt;td&gt;</code> will have a <code>score-time sc</code> class, if not, it will have a <code>score-time st</code> class. If it has one, it won't have the other.</p>
  
  <p>It's been a while since I wrote the <code>try-except</code> clauses, but if I recall correctly, the reason (I felt) I had to use them is because BS would throw an error and halt all operations when <code>row.find</code> fails to locate the HTML object.</p>
  
  <p>Is PyCharm complaining justifiably?</p>
  
  <pre><code># Get Match Score
  try:
      match_score_string = row.find("td", class_="score-time sc").get_text()
      match_string_split = match_score_string.split(" - ")
      team_a_score = int(match_string_split[0])
      team_b_score = int(match_string_split[1])
      print(team_a_score)
      print(team_b_score)
  except:
      team_a_score = None
      team_b_score = None
  
  # Get Match URL
  try:
     match_relevant_bit = row.find("td", class_="score-time sc")
     match_url = match_relevant_bit.find("a").get("href")
     match_url_done = match_url.rsplit('?JKLMN')
     match_url = match_url_done[0]
     match_finished = True
  
  except:
  
     match_relevant_bit = row.find("td", class_="score-time st")
     match_url = match_relevant_bit.find("a").get("href")
     match_url_done = match_url.rsplit('?JKLMN')
     match_url = match_url_done[0]
     match_finished = False
  </code></pre>