How to get out of stream API in python

Viewed 20

I'm working on a project using a discord bot and the Twitter stream API and I can't figure out how I can get out of the streaming loop and connect the bot to discord because the stream API request act as an infinite loop always waiting for the pieces of information.

1 Answers

I'm not sure if I follow here.

I think you first need to establish the connection and then start listening and collect the data.

Related