首页 > 解决方案 > How to perform a boolean search using the Twitter search API through tweepy

问题描述

new_tweets = api.search(q=searchQuery, count=tweetsPerQry)

How do i perform a AND , OR, NOT serach for searchQuery ?

标签: twittertweepydata-science

解决方案


  • AND 是默认值。例如 query = "big data" 在推文中是 "big" 和 "data"。
  • OR 是通过使用 OR 运算符完成的。例如查询=“喜欢或爱”
  • 否定是使用“-”符号完成的。例如查询=“苹果手机”

更多详细信息:https ://developer.twitter.com/en/docs/tweets/search/guides/standard-operators.html


推荐阅读