title: Requests does not return html anymore - Python
body: <p>I am trying to get a name from a public Linkedin url via python requests (2.7). </p>
  
  <p>The code used to work fine.</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  url = "https://www.linkedin.com/in/linustorvalds"
  html = requests.get(url).content
  
  link = BeautifulSoup(html).title.text.split("|")[0].replace(" ","")
  print link
  </code></pre>
  
  <p>The desired output is:</p>
  
  <pre><code>linustorvalds
  </code></pre>
  
  <p>I am getting the following error message:</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'text'
  </code></pre>
  
  <p>The issue seems to be that html is not returning the real content of the page. So there is no 'title' found. This is the result of printing html:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  window.onload = function() {
    var newLocation = "";
    if (window.location.protocol == "http:") {
      var cookies = document.cookie.split("; ");
      for (var i = 0; i &lt; cookies.length; ++i) {
        if ((cookies[i].indexOf("sl=") == 0) &amp;&amp; (cookies[i].length &gt; 3)) {
          newLocation = "https:" + window.location.href.substring(window.location.protocol.length);
        }
      }
    }
  
    if (newLocation.length == 0) {
      var domain = location.host;
      var newDomainIndex = 0;
      if (domain.substr(0, 6) == "touch.") {
        newDomainIndex = 6;
      }
      else if (domain.substr(0, 7) == "tablet.") {
        newDomainIndex = 7;
      }
      if (newDomainIndex) {
        domain = domain.substr(newDomainIndex);
      }
      newLocation = "https://" + domain +  "/uas/login?trk=sentinel_org_block&amp;session_redirect=" + encodeURIComponent(window.location)
    }
    window.location.href = newLocation;
  }
  &lt;/script&gt;
  &lt;/head&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Am I being blocked? What are the possible suggestions to make this code work as before?</p>
  
  <p>Thanks a lot!</p>