Python wrapper for mercury-parser
Project description
Python wrapper for mercury-parser
Installation
docker-compose.yml contains the configuration to run mercury-parser with nginx.
docker-compose up -d --scale mercury-parser=n
where n is the number of instances of mercury-parser
Then you can access the service at http://localhost:4000.
pip install mercupy-parser
Usage
from mercupy_parser import Mercupy
# api_endpoint = "http://localhost:4000/parser"
mercupy = Mercupy(api_endpoint=api_endpoint, verbose=True)
# parse single url
responses = mercupy.parser(url, headers=headers, content_type=content_type)
# parse multiple urls
responses = mercupy.parser(urls, headers=headers, content_type=content_type)
print(responses[0].json())
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
mercupy_parser-0.2.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for mercupy_parser-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca1131face3171cd7bd7976c01c6a5c2a780cd4deb968f87132c93abca413d7e |
|
MD5 | 8b5b0f7113eead5673cebf5637a69fa7 |
|
BLAKE2b-256 | 50169871a14cfe4ad67cd8b91559750965a4137e5a51917b72ac34c84cf57078 |