title: Python Beautifulsoup Getting Attribute Value
body: <p>I'm having difficulty getting the proper syntax to extract the value of an attribute in Beautifulsoup with HTML 5.0.</p>
  
  <p>So I've isolated the occurrence of a tag in my <code>soup</code> using the proper syntax where there is an HTML 5 issue:</p>
  
  <pre><code>tags = soup.find_all(attrs={"data-topic":"recUpgrade"})
  </code></pre>
  
  <p>Taking just tags[1]:</p>
  
  <pre><code>date = tags[1].find(attrs={"data-datenews":True})
  </code></pre>
  
  <p>and date here is:</p>
  
  <pre><code>&lt;span class="invisible" data-datenews="2018-05-25 06:02:19" data-idnews="2736625" id="horaCompleta"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>But now I want to extract the date time "2018-05-25 06:02:19".  Can't get the syntax.  </p>
  
  <p>Insight/help please.</p>