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.3.8.tar.gz
(47.2 kB
view hashes)
Built Distribution
Close
Hashes for modis_crawler_utils-0.3.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfb214ee4292317d64d870c31b57ded1da05630e2ba069cf3cc2a5eb479ac8c |
|
MD5 | 36d5bd4d397180ba88e77d0f51ea02f2 |
|
BLAKE2b-256 | 6fd6b22dc65e300e8c8565fa615e48396040e0142e264d4c2a12b3685512d48f |
Close
Hashes for modis_crawler_utils-0.3.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 459200195610292d0debb184df845fd8cb0ee78a1a9e8c08304c8c112a3bca9e |
|
MD5 | 16c25b7630cf2868b740e8ca7f5d561e |
|
BLAKE2b-256 | b9a8c09bda142a9c3759190b41f7d559e2eee68be255f2157062a648be0b72ad |