【发布时间】:2016-10-09 14:14:50
【问题描述】:
基于 twitter 流 apitrack 和 tweepy,我想过滤 twitter 帖子包含 "A B" 代码如下:
twitter_stream.filter(track=['A B'])
但结果出乎意料:
A New Project Featuring ASAP Rocky Vince Staples Lil B
In a contract, A & B agree to do various
但我想匹配如下:
A B want to ....
...xx A B xx...
有人有这些经历吗?
【问题讨论】:
-
stackoverflow.com/questions/36645685/… 你可以自己编写一个函数来验证推文。
标签: python nlp web-crawler tweepy twitter-streaming-api