persist item to the database table
Project description
scrapy database pipeline
Introduction
Use pipeline to persist item to the database, just provide the tablename
INSTALL
.. code:: shell
pip install scrapy_db_pipeline
Usage
configure on setting.py
.. code:: python
DB_HOST = 'localhost'
DB_USER = 'root'
DB_PASSWORD = 'password'
DB_NAME = 'db_name
ITEM_PIPELINES = {
#...
'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.
TODO:
database support (if I have time):
- mysql
- ....
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Built Distribution
Close
Hashes for scrapy_db_pipeline-1.1-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17a2e2540260c7eb32bd0ef301fda15103b89793c3a44ff46520325661bec2d8 |
|
MD5 | 2861aed9c1ddec071a80cb5675232bef |
|
BLAKE2-256 | 5b6de9fd366d9d9172edb3f8c34159c64640577f9ca61ff3ac4fb07dbcc085c5 |