MCPcopy
hub / github.com/scrapy/scrapy / read

Method read

scrapy/utils/iterators.py:137–145  ·  view source on GitHub ↗
(self, n: int = 65535)

Source from the content-addressed store, hash-verified

135 self._is_first_read: bool = True
136
137 def read(self, n: int = 65535) -> bytes:
138 method: Callable[[int], bytes] = (
139 self._read_unicode if self._is_unicode else self._read_string
140 )
141 result = method(n)
142 if self._is_first_read:
143 self._is_first_read = False
144 result = result.lstrip()
145 return result
146
147 def _read_string(self, n: int = 65535) -> bytes:
148 s, e = self._ptr, self._ptr + n

Callers 15

sendMethod · 0.80
md5sumFunction · 0.80
get_configFunction · 0.80
_unzstdFunction · 0.80
download_requestMethod · 0.80
_md5sumFunction · 0.80
retrieve_responseMethod · 0.80
_store_in_threadMethod · 0.80
test_fetchMethod · 0.80

Calls

no outgoing calls

Tested by 9

_store_in_threadMethod · 0.64
test_fetchMethod · 0.64
get_gzip_compressedMethod · 0.64
make_responseMethod · 0.64
_check_outputMethod · 0.64
test_profilingMethod · 0.64