Skip to main content

persist item to the database table

Project description

scrapy database pipeline


Use pipeline to persist item to the database, just provide the tablename


.. code:: shell

pip install scrapy_db_pipeline


configure on

.. code:: python

DB_HOST = 'localhost'
DB_USER = 'root'
DB_PASSWORD = 'password'
DB_NAME = 'db_name

   'scrapy_db_pipeline.pipelines.DBStorePipeline': 300,

write your item

.. code:: python

class CalendarItem(scrapy.Item):
    __table_name__ = 'your_table_name'
    some_item = scrapy.Field()  

tips: You must create the table before running Scrapy. Because I can't know what the type of your field on the database table.


database support (if I have time):

  • mysql
  • ....

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

scrapy_db_pipeline-1.1-py3.7.egg (4.7 kB view hashes)

Uploaded 3 7

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page