

def _listen_for_dweets_from_response(response):
    "Yields dweets as received from dweet.io's streaming API\n    "
    streambuffer = ''
    for byte in response.iter_content():
        if response:
            streambuffer += byte.decode('ascii')
            try:
                dweet = json.loads(streambuffer.splitlines()[1])
            except (IndexError, ValueError):
                continue
            if isstr(dweet):
                (yield json.loads(dweet))
            streambuffer = ''

dataset/ETHPy150Open paddycarey/dweepy/dweepy/streaming.py _listen_for_dweets_from_response/VarMisuse@28/65 `byte`->`response`