Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/conradj/now-mercury-parser

Easily deployed mercury-parser endpoint
https://github.com/conradj/now-mercury-parser

Last synced: about 7 hours ago
JSON representation

Easily deployed mercury-parser endpoint

Awesome Lists containing this project

README

        

## Mercury URL Parser for Zeit Now

- [Mercury Parser](https://github.com/postlight/mercury-parser) extracts structured information from a URL.
- [Now](https://zeit.co/now) is a really good serverless deployment platform. The free tier will allow 1000 calls per day for $0 per month, no credit card required.

## Guide
1. [Setup Github integration for Now](https://zeit.co/github-setup). This will look for a `now.json` file in your Github repos and deploy to `Now` after a push.
2. Fork this repo to deploy 🎉
3. That's it! 🤯 `Now` will give you a URL that will look a bit like https://now-mercury-parser.now.sh. So if you want to parse [this](https://www.bbc.co.uk/news/world-europe-48198755) odd story about a speeding pigeon then you would call `https://now-mercury-parser.beyonceknowles.now.sh/https://www.bbc.co.uk/news/world-europe-48198755` and get a response as follows:

```json
{
"title": "Speeding pigeon caught on German camera goes viral",
"author": null,
"date_published": null,
"dek": null,
"lead_image_url": "https://ichef.bbci.co.uk/news/1024/branded_news/112DB/production/_106836307_taube.jpg",
"content": "

\"Pigeon Image copyright Stadt Bocholt Image caption Town authorities said the pigeon had been "on a collision course with vehicles or pedestrians"

It was a quiet afternoon in Bocholt in western Germany when a pigeon broke the calm and the speed limit, flying down a residential street at 45km/h (28mph) in a 30km/h zone.


A mobile speed camera flashed as soon as the pigeon flew past.


Authorities in the town, a short distance from the Dutch border, published the picture last week, and it has since gone viral.


Under normal circumstances the penalty for speeding would be €25 (£21;$28).


The bizarre event took place in February but Bocholt town hall's Facebook account said it had taken some time to assess the pictures.


The town said that even with a 3km/h margin allowed in speeding cases, the pigeon had been going 12km/h too fast and was "on a collision course with vehicles and pedestrians".


One local said it was clearly a racing pigeon, while another suggested an appropriate punishment would be community service as a carrier pigeon.


The Bocholt Facebook page said philosophically: "Whether and, above all, how the fast bird can and will pay its €25 on-the-spot fine remains to be seen."

",
"next_page_url": null,
"url": "https://www.bbc.co.uk/news/world-europe-48198755",
"domain": "www.bbc.co.uk",
"excerpt": "The bird was flashed by speed radar travelling 15km/h over the speed limit in the town of Bocholt.",
"word_count": 194,
"direction": "ltr",
"total_pages": 1,
"rendered_pages": 1
}
```