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.1.tar.gz
(14.6 kB
view hashes)
Built Distribution
Close
Hashes for mercupy_parser-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6359e589850095cd77f2ec170ff04333e3600fa0c45e8771b739a341a2f73da6 |
|
MD5 | a172bf686e87fc4f4661c29b3d8b74e7 |
|
BLAKE2b-256 | d951ce4ab2bc107709fe62998527d57539b1a91f447eb552c7573e13191bbec3 |