Skip to main content

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


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)

Uploaded Source

Built Distribution

mercupy_parser-0.2.1-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page