【发布时间】:2021-12-15 21:00:27
【问题描述】:
我想在 jupyter notebook 中抓取一些 twitter 数据。我的 python 版本是 3.9+,当我运行时:
import snscrape.modules.twitter as sntwitter
我收到以下错误:
/opt/homebrew/lib/python3.9/site-packages/snscrape/modules/telegram.py in <module>
23
24 @dataclasses.dataclass
---> 25 class TelegramPost(snscrape.base.Item):
26 url: str
27 date: datetime.datetime
/opt/homebrew/lib/python3.9/site-packages/snscrape/modules/telegram.py in TelegramPost()
30 linkPreview: typing.Optional[LinkPreview] = None
31
---> 32 outlinksss = snscrape.base._DeprecatedProperty('outlinksss', lambda self: ' '.join(self.outlinks), 'outlinks')
33
34 def __str__(self):
AttributeError: module 'snscrape.base' has no attribute '_DeprecatedProperty'
有谁知道如何解决这个问题?
ps:我已经仔细检查了系统要求并下载了使用的包
pip3 install snscrape
【问题讨论】:
标签: python api web-scraping twitter