title: Python: Beautiful Soup: Can't grab a full title from parsing
body: <p>I am attempting to practice scraping by going to a video website, and scraping all the titles of the videos on the homepage. My only issue is, if the title is too long, it gets cut short using the .string function in BeautifulSoup. </p>
  
  <p>Here is example HTML for parsing:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;head&gt;...&lt;/head&gt;
  &lt;body class="home"&gt;
      &lt;div id="main"&gt;
          &lt;div id="content"&gt;
              &lt;div id="vid_28" class="thumb-block "&gt;
                  &lt;div class="thumb-inside"&gt;...&lt;/div&gt;
                  &lt;p&gt;
                      &lt;a href="/vid_28/0/this_is_a_great_video_"
                      title="this is a great video"&gt;this is a great vi...&lt;/a&gt;
                  &lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Here is the code I am attempting to print the title with:</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  url = "example"
  r = requests.get(url)
  
  soup = BeautifulSoup(r.content, "lxml")
  
  links = soup.find_all("div", {"class":"thumb-block"})
  
  for link in links:
      for tag in link.find_all("a")
          print(tag.string)
  </code></pre>
  
  <p>This code is working how I want it, except it's printing the string "this is a great vi..." which is cut short. </p>
  
  <p>If you notice in the HTML, the text after "title=" never gets cut short. </p>
  
  <p>How can I modify my code to acquire the text in parentheses after the "title=" within the  element, instead of acquiring the text that is cut off?</p>