class RequestsHTTPStream(object):

    def __init__(self, url):
        self.url = url

def iter_lines(self):
    headers = {'Cache-Control': 'no-cache', 'Accept': 'text/event-stream',
        'Accept-Encoding': 'gzip'}
response = requests.get(self.url, stream=True, headers=headers)
return response.iter_lines(chunk_size=1)
Efficiently reading lines from compressed, chunked HTTP stream as they arrive