Search term intersection and union using Python Tweepy

后端 未结 1 1044
别跟我提以往
别跟我提以往 2021-01-23 17:36

I would like to get the tweets that either contain \'love\' and/or \'#hate\' using Python Tweepy. But using my current code as below, it only returns the first term (i.e. \'love

相关标签:
1条回答
  • 2021-01-23 17:44

    From looking at the twitter API documentation, the 'or' should be capitalized and should be inside the single quotes:

    q = ('love OR #hate')

    https://dev.twitter.com/rest/public/search

    0 讨论(0)
提交回复
热议问题