Scrapy utils for Modis crawlers projects.
Project description
crawler-utils
Scrapy utils for Modis crawlers projects.
MongoDB
Some utils connected with mongodb.
MongoDBPipeline - pipeline for saving items in mongodb.
Params:
- MONGODB_SERVER - address of mongodb database.
- MONGODB_PORT - port of mongodb database.
- MONGODB_DB - database where to save data.
- MONGODB_USERNAME - username for authentication in mongodb in MONGODB_DB database.
- MONGODB_PWD - password for authentication.
- DEFAULT_MONGODB_COLLECTION - default collection where to save data (default value is
test
). - MONGODB_COLLECTION_KEY - key of item which identifies items collection name (
MONGO_COLLECTION
) where to save item (default value iscollection
). - MONGODB_UNIQUE_KEY - key of item which identifies item
Kafka
Some utils connected with kafka.
KafkaPipeline - pipeline for pushing items into kafka.
Pipeline outputs data into stream with name {RESOURCE_TAG}.{DATA_TYPE}
.
Where RESOURCE_TAG
is tag of resource from which data is crawled and DATA_TYPE
is type of
data crawled: data
, post
, comment
, like
, user
, friend
, share
, member
, news
,
community
.
Params:
- KAFKA_ADDRESS - address of kafka broker.
- KAFKA_KEY - key of item which is put into kafka record key.
- KAFKA_RESOURCE_TAG_KEY - key of item which identifies item
RESOURCE_TAG
(default value isplatform
) - KAFKA_DEFAULT_RESOURCE_TAG - default
RESOURCE_TAG
for crawled items withoutKAFKA_RESOURCE_TAG_KEY
(default value iscrawler
) - KAFKA_DATA_TYPE_KEY - key of item from which identifies item
DATA_TYPE
(default value istype
). - KAFKA_DEFAULT_DATA_TYPE - default
DATA_TYPE
for crawled items withoutKAFKA_DATA_TYPE_KEY
(default value isdata
). - KAFKA_COMPRESSION_TYPE - type of data compression in kafka for example
gzip
.
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.
Source Distribution
modis_crawler_utils-0.2.74.tar.gz
(41.8 kB
view hashes)
Built Distribution
Close
Hashes for modis_crawler_utils-0.2.74.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f584eedf0651a9a758964ad475b6616bae70952022bda79833a3e2dbfdaac304 |
|
MD5 | 3059cf06ba0a228dac951a89537b12e9 |
|
BLAKE2b-256 | a9bb9a5844a16fadaf1900ffac39fc2bd4167d24f198d59d2345c7e193e8a3bc |
Close
Hashes for modis_crawler_utils-0.2.74-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4318cd5385a1d60648d7604c4f831321abc015c382098dea32c799917bb4a456 |
|
MD5 | ee83b2c79e48c6e730a20e31fd100652 |
|
BLAKE2b-256 | 6e50edc1f888cb1363f6b6f14fa2e9b4e39b2068f89738ae5736b1cc43818f07 |