StoreScrapper
StoreScrapper provides a convenient API to obtain product information from a variety of stores. Typical usage of the library is as follows:
#!/usr/bin/env python
from storescrapper.stores import Sym
for product in Sym.products():
print product
Features
Obtain name, URL and price for many of the stores in the market in a straighforward way.
Obtain only the types of products you need.
Easily extensible with new stores and product types that plug-in into the existing framework.
Leverage the power of asynchronous tasks using Celery to speed-up the scrapping process ten-fold.
Never used Celery before? You can get up and running in minutes.
Installation
The easiest way to install storescrapper is using pip:
pip install storescrapper
Otherwise you can download the tar.gz source, extract its contents and install the library directly. But first let’s make sure everything works as expected:
python setup.py test
Don’t worry if you get a TypeError exception at the end, just make sure all the tests pass.
After that build and install the library (you may need superuser privileges for the second command):
python setup.py build python setup.py install
Using StoreScrapper in Linux
Install the RabbitMQ server with your distribution package manager (Fedora yum in this case):
sudo yum install rabbitmq-server
Note for Ubuntu users: The RabbitMQ server included with the distribution is extremely dated and incompatible, with the current version of celery / kombu. Install RabbitMQ from another source.
Install the StoreScrapper package:
sudo pip install storescrapper
In an empty directory, create a celeryconfig.py file with the following contents:
BROKER_URL = 'amqp://guest:guest@localhost/' CELERY_RESULT_BACKEND = 'amqp' CELERY_IMPORTS = [ 'storescrapper.store' ] CELERYD_CONCURRENCY = 20 CELERY_TASK_PUBLISH_RETRY = True
Open three terminals at the same time on this directory. On the first one execute:
sudo rabbitmq-server
On the second one execute:
celeryd -l info
On the third one open a Python shell and write the following commands to print the products from Sym:
from storescrapper.stores import Sym for product in Sym.products(): print productIn one or two minutes this will return all of the products in the store with the current products types. You can check the progress on the shell that is running celeryd.
Metadata
Release files for storescrapper 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| storescrapper-0.2.5.tar.gz | 29.0 kB | Without provenance | Details for storescrapper-0.2.5.tar.gz |
Release files / storescrapper-0.2.5.tar.gz
| Download URL | storescrapper-0.2.5.tar.gz |
|---|---|
| Size | 29.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11142bb07b8d3b77af60ce03f3e0c09b047f66894345e8bc4542df43a9dfbb35
|
|
BLAKE2b-256 checksum How to use checksums |
d1bce978ecfcd3273724a0600c6643a9583b5cbcdbd52e4870f91e657691d365
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for storescrapper 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.