Skip to main content

persist item to the database table

Project description


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


pip install scrapy_db_pipeline


configure on

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

   'scrapy_db_pipeline.pipelines.DBStorePipeline': 300,

write your item

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):

  • [x] mysql
  • [ ] ….

Project details

Release history Release notifications

This version


Download files

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

Files for scrapy_db_pipeline, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size scrapy_db_pipeline-1.0.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page