I’m fairly new to coding, so I’m not quite sure what to do. I’m using a MacBook and downloaded PyCharm for my coding class, and so far, I’ve been able to figure most things out, but I’m stuck on this one.
I’m trying to get the tweepy Stream Listener to return the tweets for a certain hashtag, and this code worked without issue on the Windows computers on campus.
The code I’m running looks like this:
#override tweepy.StreamListener to add logic to on_status
def on_status(self, status):
def on_error(self, status_code):
if status_code == 420:
# returning False in on_data disconnects the stream
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
myStreamListener = MyStreamListener()
myStream = tweepy.Stream(auth, listener=myStreamListener)
But I am sniffing the request and it has not the Authorization header (any other that I put will appear, but not Authorization). In Xcode I have enabled ‘AllowArbitraryLoads’. So my API returns 401 (Unauthorized) because obviously there is no Authorization header. Why is it not included in my request?