scrachy.db.models.Response
- class scrachy.db.models.Response(**kwargs)[source]
Bases:
BaseStores the minimum amount of information to recreate the html of a page given its request fingerprint. The cache only stores the most recent version of the page, but the
ScrapyHistorytable can be used to viewAdditional data is stored in other tables, but can be accessed via relationships.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- __init__(**kwargs)
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
Methods
__init__(**kwargs)A simple constructor that allows initialization from kwargs.
to_dict([hide_missing, exclude_keys])Attributes
bodybody_lengthextracted_textextracted_text_lengthfingerprintheadersRefers to the
_schema.MetaDatacollection that will be used for new_schema.Tableobjects.methodRefers to the
_orm.registryin use where new_orm.Mapperobjects will be associated.request_bodyrequest_methodscrape_historyscrape_timestampstatustype_annotation_mapurl- metadata: ClassVar[MetaData] = MetaData()
Refers to the
_schema.MetaDatacollection that will be used for new_schema.Tableobjects.See also
- registry: ClassVar[_RegistryType] = <sqlalchemy.orm.decl_api.registry object>
Refers to the
_orm.registryin use where new_orm.Mapperobjects will be associated.