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
- ....
Release files for scrapy-db-pipeline 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scrapy_db_pipeline-1.1-py3.7.egg | Legacy Egg format | - | - | Details |
Release files / scrapy_db_pipeline-1.1-py3.7.egg
| Download URL | scrapy_db_pipeline-1.1-py3.7.egg |
|---|---|
| Size | 4.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
17a2e2540260c7eb32bd0ef301fda15103b89793c3a44ff46520325661bec2d8
|
|
BLAKE2b-256 checksum How to use checksums |
5b6de9fd366d9d9172edb3f8c34159c64640577f9ca61ff3ac4fb07dbcc085c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|