As an addition to Andrej answer.
This technique is called re-engineering HTTP requests. It's the more efficient way of scraping dynamic content, content loaded by javascript.
The alternative to this would be use the selenium package to mimic browser activity. This is slower and more brittle in the long term. The package creates a secure connectiong to make HTTP requests that simulate browser activity.
You can find the requests of the browser which Javascript envokes to provide content on the page. If you inspect the page in chrome, go to network tools --> XHR.
Here you will find all requests that Javascript will envoke. In this case, there are two requests, one to twitter and the one we want. To access the response which is what we're interested in we sometimes need to just make an HTTP get/post request, but sometimes we need to add headers/data/parameters/cookies.

The preview here shows you a snapshot of the data, in this case we get back HTML, which we can then parse using beautifulsoup.
As Andrej points out eloquently you can find this information on the right hand side of the screen when click the headers tab and scroll down. You will find the request headers, you'll find parameters, query's and formdata. In this case, the formdata is where
data = {
'ajax': 'true',
'mobile': 'false'
}
Comes from.
You can play about with this, if that doesn't get you the response you want, adding user-agent, headers, other parameters that are part of the request can help. I tend to copy the the request which if you right click the request you can copy the cURL(bash) and input this into curl.trillworks.com.

This presents the request with the headers/data/parameters required to mimic this request. Sometimes it's abit overkill and gives you more data that you actually need to send to get the correct response. But you can play about with all that data and try to get the most minimal request to get the response you want.