Skip to content

Commit

Permalink
stream: Remove set decode_unicode
Browse files Browse the repository at this point in the history
This doesn't handle well with every unicode strings, let only json.loads() do the decode instead.
  • Loading branch information
hyche authored Jan 6, 2022
1 parent 972aa86 commit e603d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shodan/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _create_stream(self, name, query=None, timeout=None):
return req

def _iter_stream(self, stream, raw):
for line in stream.iter_lines(decode_unicode=True):
for line in stream.iter_lines():
# The Streaming API sends out heartbeat messages that are newlines
# We want to ignore those messages since they don't contain any data
if line:
Expand Down

0 comments on commit e603d46

Please sign in to comment.