Twitter posts are displayed by JavaScript. Using requests.get
will not load any dynamic content or run any JavaScript. (Hint: use view-source on a webpage to see what requests get, not the inspector)
You may want to look into something like selenium
instead, which is a browser automation tool that will load webpages using a browser so all the dynamic content and javascript should work the same as you see it in your own browser.
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('my twitter url')
soup = BeautifulSoup(driver.page_source, 'html.parser')
...
Note that you'll need to install selenium and an acconpanying webdriver for the browser you want (e.g chromedriver for chrome, geckodriver for firefox, etc)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…