Crawly.Pipelines.CSVEncoder (Crawly v0.17.0) View Source

Encodes a given item (map) into CSV. Does not flatten nested maps.


If no fields are given, the item is dropped from the pipeline.

  • :fields, required: The fields to extract out from the scraped item. Falls back to the global config :item.

Example Usage

iex> item = %{my: "first", other: "second", ignore: "this_field"} iex>, %{}, fields: [:my, :other]) {"first,second", %{}}