Skip to content

Commit 7fb0ea4

Browse files
committed
Drop _key from iter results
1 parent a963d2d commit 7fb0ea4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scrapinghub/client/proxy.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ def iter(self, _path=None, count=None, requests_params=None, **apiparams):
110110
"""
111111
update_kwargs(apiparams, count=count)
112112
apiparams = self._modify_iter_params(apiparams)
113-
return self._origin.iter_values(_path, requests_params, **apiparams)
113+
drop_key = '_key' not in apiparams.get('meta', [])
114+
for entry in self._origin.iter_values(
115+
_path, requests_params, **apiparams
116+
):
117+
if drop_key and '_key' in entry:
118+
entry.pop('_key')
119+
yield entry
114120

115121

116122
class _MappingProxy(_Proxy):

0 commit comments

Comments
 (0)