Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 668 Bytes

README.md

File metadata and controls

61 lines (43 loc) · 668 Bytes

Crawlab Python SDK

Python SDK for Crawlab

Installation

pip install crawlab-sdk

Usage

CLI

crawlab-cli

Scrapy Integration

In settings.py, add the following:

ITEM_PIPELINES = {
    'crawlab.CrawlabPipeline': 300
}

Save Scraped Items

from crawlab import save_item

scraped_items = [
    {
        'name': 'item1',
        'value': 'value1'
    },
    {
        'name': 'item2',
        'value': 'value2'
    }
]

for item in scraped_items:
    save_item(item) 

Development

Pre-requisites

pip install poetry

Install dependencies

poetry install