title: Twitter no longer works with requests library python
body: <p>I have a python function that uses the requests library and BeautifulSoup to scrape a particular user's tweets. </p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  contents = requests.get("https://twitter.com/user")
  soup = BeautifulSoup(contents.text, "html.parser")
  </code></pre>
  
  <p>When the requests library accesses Twitter, it uses the legacy version of Twitter. However, since Twitter recently dropped support for its legacy version, the requests library no longer works and returns html code saying that this version of Twitter is out of date. </p>
  
  <p>Is there a way to make the requests library access the newer version of Twitter?</p>