MCPcopy
hub / github.com/scrapy/scrapy / __init__

Method __init__

scrapy/exporters.py:114–118  ·  view source on GitHub ↗
(self, file: BytesIO, **kwargs: Any)

Source from the content-addressed store, hash-verified

112
113class JsonLinesItemExporter(BaseItemExporter):
114 def __init__(self, file: BytesIO, **kwargs: Any):
115 super().__init__(dont_fail=True, **kwargs)
116 self.file: BytesIO = file
117 self._kwargs.setdefault("ensure_ascii", not self.encoding)
118 self.encoder: JSONEncoder = ScrapyJSONEncoder(**self._kwargs)
119
120 def export_item(self, item: Any) -> None:
121 itemdict = dict(self._get_serialized_fields(item))

Callers

nothing calls this directly

Calls 3

ScrapyJSONEncoderClass · 0.90
__init__Method · 0.45
setdefaultMethod · 0.45

Tested by

no test coverage detected