Spider Middlewares#
- class kingfisher_scrapy.spidermiddlewares.ConcatenatedJSONMiddleware[source]#
If the spider’s
concatenated_json
class attribute isTrue
, yields each object of the File as a FileItem. Otherwise, yields the original item.
- class kingfisher_scrapy.spidermiddlewares.LineDelimitedMiddleware[source]#
If the spider’s
line_delimited
class attribute isTrue
, yields each line of the File as a FileItem. Otherwise, yields the original item.
- class kingfisher_scrapy.spidermiddlewares.RootPathMiddleware[source]#
If the spider’s
root_path
class attribute is non-empty, replaces the item’sdata
with the objects at that prefix; if there are multiple releases, records or packages at that prefix, combines them into a single package, and updates the item’sdata_type
if needed. Otherwise, yields the original item.
- class kingfisher_scrapy.spidermiddlewares.AddPackageMiddleware[source]#
If the spider’s
data_type
class attribute is “release” or “record”, wraps the item’sdata
in an appropriate package, and updates the item’sdata_type
. Otherwise, yields the original item.
- class kingfisher_scrapy.spidermiddlewares.ResizePackageMiddleware[source]#
If the spider’s
resize_package
class attribute isTrue
, splits the package into packages of 100 releases or records each. Otherwise, yields the original item.