查询某个日期范围内创建的 Twitter 配置文件?

Query Twitter profiles created within a date range?

我目前正在使用 Tweepy 获取一组用户配置文件,其中包含如下某些词:

profile_query = "cats, dogs"
profiles = api.search_users(profile_query)

for profile in profiles:
    print(profile.screen_name)
    print(profile.description)

有没有办法查询在特定日期范围内创建的配置文件?我能想到的唯一方法是使用 Cursor 查询,但这似乎忽略了我设置的日期:

date_since = "2021-04-01"
profiles = tweepy.Cursor(api.search_users,
                         q=profile_query,
                         lang="en",
                         since=date_since).items(5)

以上查询仍然是 returns 个在 2021 年 4 月 1 日之前创建的配置文件。有没有办法查询在 on/after 特定日期创建的配置文件?

谢谢!

不,没有关于此的 Twitter API。 Cursor 仅对结果分页有用,但 search_users 方法本身不支持 since 参数,因此这将被忽略 - 这就是您所看到的。您必须在代码中按日期手动过滤掉配置文件,并“删除”创建日期超出所需范围的配置文件。