mercury-parserpy
mercury-parserpy copied to clipboard
python api wrapper for https://mercury.postlight.com/web-parser/
mercury-parserpy
Getting Started
From the command line:
pip install mercury-parserpy
Usage
from mercury_parser.client import MercuryParser
# default api endpoint is http://localhost:3000/
parser = MercuryParser()
article = parser.parse_article('ARTICLE_URL')
article.json()
articles = ['url1', 'url2', 'url3']
# parse multiple articles urls return a JSON
# where the key is the article url
articles = parser.parse_multiple_articles(articles)
Customize API Endpoint
from mercury_parser.client import MercuryParser
parser = MercuryParser(api_endpoint="http://api-endpoint/")