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.77.tar.gz
(42.1 kB
view hashes)
Built Distribution
Close
Hashes for modis_crawler_utils-0.2.77.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | feca4e271b60eed71d7166d5628d6234215fc9fa95b77875ff84e951a2f760da |
|
MD5 | cc1df32be499737f75399b5c68c4414d |
|
BLAKE2b-256 | 023a717b363c77653a6f810d8efc25102dfc927aaa9da86b1142d57e4b48a658 |
Close
Hashes for modis_crawler_utils-0.2.77-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 831f09f94c734459dc1b879788244681f5d37c7ce2149edbe5dacff86cde3557 |
|
MD5 | a005e5f609f35656a3461cfc7c5cd770 |
|
BLAKE2b-256 | 178bf3402c88c984bc87de5f5ea2b1b17baaf5f4484434824ec8eccfa5707b44 |