Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/341.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
请求库在Twitter/Python上不起作用_Python_Twitter_Request_Tweets - Fatal编程技术网

请求库在Twitter/Python上不起作用

请求库在Twitter/Python上不起作用,python,twitter,request,tweets,Python,Twitter,Request,Tweets,我有一个非常简单的代码: import requests url = "https://twitter.com/DropSentry/status/1390800094241382402" tweet = requests.get(url) print(tweet.text) 它会把推文的内容打印出来。问题是,它只是给我打印随机的东西,而不是真正的帖子。我也尝试了tweet.content,但效果并不理想 有什么想法吗?Google的“抓取AJAX页面”功能。

我有一个非常简单的代码:

import requests
url = "https://twitter.com/DropSentry/status/1390800094241382402"
tweet = requests.get(url)
print(tweet.text)
它会把推文的内容打印出来。问题是,它只是给我打印随机的东西,而不是真正的帖子。我也尝试了
tweet.content
,但效果并不理想

有什么想法吗?

Google的“抓取AJAX页面”功能。