【发布时间】:2017-10-10 06:01:29
【问题描述】:
如何在推特中提取一个人的关注者?比如我想提取特朗普的粉丝列表,用BeautifulSoup怎么做?
我试图在 twitter 中提取 Finn Balor 的关注者列表。我获取了 url 并将 BeeautifulSoup 对象应用于它。但它并没有给文档我在“查看页面源”中看到的内容。如何解决?
import requests
from bs4 import BeautifulSoup
r=requests.get("https://twitter.com/FinnBalor/followers")
c=r.content
soup=BeautifulSoup(c,"html.parser")
soup.find_all("div",{"class":"ProfileCard-content"})
这是我使用的代码。
【问题讨论】:
-
你能提供一些代码吗?
-
我已经添加了我使用的代码。最后一行代码不起作用。
标签: python beautifulsoup python-requests