MCPcopy
hub / github.com/scrapy/scrapy / export_item

Method export_item

scrapy/exporters.py:160–164  ·  view source on GitHub ↗
(self, item: Any)

Source from the content-addressed store, hash-verified

158 self.file.write(b"]")
159
160 def export_item(self, item: Any) -> None:
161 itemdict = dict(self._get_serialized_fields(item))
162 data = to_bytes(self.encoder.encode(itemdict), self.encoding)
163 self._add_comma_after_first()
164 self.file.write(data)
165
166
167class XmlItemExporter(BaseItemExporter):

Callers

nothing calls this directly

Calls 4

to_bytesFunction · 0.90
writeMethod · 0.45

Tested by

no test coverage detected