如何过滤字符间空白的twitter?

2024-09-28 23:37:17 发布

您现在位置:Python中文网/ 问答频道 /正文

基于twitter流api track和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...

有人有这样的经历吗?你知道吗


Tags: to代码projectapi内容newstreamtwitter