walfie / gbf-raidfinder

Granblue Raid Finder (Archived: Granblue no longer has raid tweets)
https://gbf-raidfinder.aikats.us
MIT License
206 stars 106 forks source link

Want to know: How to track Filtered Stream in Japanese #126

Closed XinoAssassin closed 6 years ago

XinoAssassin commented 6 years ago

Hello walfie, recently days I'm working on writing a RaidFinder with Node.js and I found a problem:
How to track Twitter Stream use keyword: "参加者募集!". Because in Twitter official guide#track, it says "Non-space separated languages, such as CJK are currently unsupported. " And when I use the API, it works absolutely likes what the docs said. But when I'm reading this project's source code, I found you just set "\"参加者募集!\" OR \"I need backup!\"" as the default default search terms.(in TwitterSearcher.scala) Could you tell me some ideas about this problem? Thanks a lot.

walfie commented 6 years ago

The "参加者募集!" OR "I need backup!" search term is used in the search API (non real-time), which is only on startup.

The tracked keywords for the streaming part can be found in TwitterStreamer.scala:

"参加者募集!", ":参戦ID", "I need backup!", ":Battle ID"

XinoAssassin commented 6 years ago

Thanks a lot. Now I know the request body to stream/filter API which contains "track=keywords" is just spilt by ','.