• This repository has been archived on 11/Oct/2022
  • Stars
    star
    379
  • Rank 113,004 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tiny Node.js microservice to scrape open graph data with joy.

micro-open-graph

A tiny Node.js microservice to scrape open graph data with joy.

Running this microservice you won't need a backend solely to get some meta information about links your users submit. Press the deploy button below and show your users what the links they're clicking on contain!

Deployment

Your own micro-open-graph is one click away:

Deploy to now

You can also deploy with a single command from the terminal (assuming you have now installed):

now withspectrum/micro-open-graph

Usage

To get the data for a given URL, for example mxstbr.blog, simply add that URL (safely escaped) to the url query parameter:

https://your-url.now.sh/?url=http://mxstbr.blog

And you will get the parsed data in the following format:

{
	"author": null,
	"date": "2017-02-16T11:00:00.000Z",
	"description": "Fresh thinking and expert tips about HTML, CSS, JavaScript and other web technologies.",
	"image": "http://mxstbr.blog/social_media.png",
	"publisher": "<mxstbr/>",
	"title": "<mxstbr/>",
	"url": "http://mxstbr.blog/"
}

Note: Not all of this, or even more, data might be available depending on the meta tags the page has in its HTML. (see metascraper for the full list of supported properties)

We infer the data from more places than just the open graph meta tags, we also support twitter meta tags and fallback to standard HTML tags like e.g. the title tag if no open graph data was specified. Results are cached in memory for 24 hours, which means calling this with the same URL repeatedly won't have a large impact on your server!

Development

git clone [email protected]:withspectrum/micro-open-graph.git
npm run dev

The server will then be listening at localhost:3000.

Updating

The master branch of this repository is what you will be deploying. To update to a new version with potential bugfixes, all you have to do is run the now command again and change the URL you call in your app! πŸ‘Œ

License

Copyright (c) 2017 Maximilian Stoiber, licensed under the MIT license. See LICENSE.md for more information.

More Repositories

1

spectrum

Simple, powerful online communities.
JavaScript
10,769
star
2

react-app-rewire-styled-components

Add the styled-components Babel plugin to your create-react-app app via react-app-rewired
JavaScript
170
star
3

graphql-log

Add logging to your GraphQL resolvers so you know what's going on in your app.
JavaScript
96
star
4

callback-to-async-iterator

Turn any callback-based listener into an async iterator.
JavaScript
94
star
5

code-of-conduct

The Code of Conduct for all communities on Spectrum
58
star
6

redis-tag-cache

Cache and invalidate records in Redis with tags
JavaScript
53
star
7

draft-js-prism-plugin

Add syntax highlighting support to your DraftJS editor
JavaScript
49
star
8

slate-markdown

Add live markdown preview support to your Slate editor.
JavaScript
45
star
9

draft-js-code-editor-plugin

Add IDE-like behaviours to code blocks in your DraftJS editors
JavaScript
36
star
10

danger-plugin-no-console

DangerJS plugin to prevent merging any code that contains console log statements
JavaScript
32
star
11

badge

Spectrum badge for GitHub READMEs
28
star
12

npm-pkg

Create your npm package with ESNext, Flowtype and prettier.
JavaScript
24
star
13

markdown-linkify

Turn plain URLs in text into Markdown links. Works in the browser and on the server.
JavaScript
23
star
14

slate-mentions

Add support for mentions to your Slate editor.
JavaScript
22
star
15

micro-code-analyser

A tiny Node.js microservice to detect the language of a code snippet
JavaScript
22
star
16

danger-plugin-flow

Ensure all JS files that get touched in a PR are flow typed
TypeScript
22
star
17

micro-anonymizomatic

A microservice to anonymize strings
JavaScript
18
star
18

danger-plugin-labels

Let any contributor add labels to their PRs and issues
TypeScript
17
star
19

micro-redirect

A tiny Node.js microservice to redirect users to a different location.
JavaScript
16
star
20

jscodeshift-graphql-files

Transform .js files with GraphQL template literals into .graphql files
JavaScript
14
star
21

rethinkdb-inspector

πŸ•΅οΈβ€β™€οΈ Inspect your RethinkDB queries and find out how fast they are. (compatible with rethinkdbdash)
JavaScript
12
star
22

franz-spectrum

JavaScript
6
star
23

micro-markdown-converter

A tiny Node.js microservice to convert markdown to raw DraftJS content state and vice-versa
JavaScript
5
star
24

draft-js-validate

[WIP DOES NOT WORK YET]
JavaScript
2
star
25

peril-settings

This contains our Dangerfiles
TypeScript
1
star