Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stve/go-opengraph-server
https://github.com/stve/go-opengraph-server
opengraph
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/stve/go-opengraph-server
- Owner: stve
- License: mit
- Created: 2017-03-03T15:25:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T21:34:32.000Z (almost 8 years ago)
- Last Synced: 2024-10-16T10:30:48.837Z (3 months ago)
- Topics: opengraph
- Language: Go
- Size: 73.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# go-opengraph-server
A small microservice to retrieve Open Graph data from websites and return as JSON.
# Usage
Pass the URL you want to extract data from by passing the `url` parameter:
```
http://localhost:8000/?url=https://vimeo.com/205090959
```Parsed data is returned as JSON:
```json
{
"site_name": "Vimeo",
"type": "video",
"title": "Symphony of Light - Kauai Timelapse",
"description": "From the towering green spires to the pristine beaches, the stunning island of Kauai offers an incredible range of unique landscapes to explore. \"Symphony of…",
"url": "https://vimeo.com/205090959",
"videos": [
{
"height": "545",
"secure_url": "https://player.vimeo.com/video/205090959?autoplay=1",
"type": "text/html",
"url": "https://player.vimeo.com/video/205090959?autoplay=1",
"width": "1280"
},
{
"height": "545",
"secure_url": "https://vimeo.com/moogaloop.swf?clip_id=205090959\u0026autoplay=1",
"type": "application/x-shockwave-flash",
"url": "https://vimeo.com/moogaloop.swf?clip_id=205090959\u0026autoplay=1",
"width": "1280"
}
],
"images": [
{
"height": "545",
"secure_url": "https://i.vimeocdn.com/video/619779422_1280x545.jpg",
"type": "image/jpg",
"url": "https://i.vimeocdn.com/video/619779422_1280x545.jpg",
"width": "1280"
}
]
}
```## Caveats
My use case was for fetching data from Vimeo and YouTube. I haven't tested other sites and some assumptions were made in generating JSON based on my specific needs that may not make sense or be applicable to other sites and their Open Graph data.
## Additional Caveats
I don't write much go code, feedback is **definitely** welcome!
## License
MIT (c) Steve Agalloco. See [LICENSE](https://github.com/stve/go-opengraph-server/blob/master/LICENSE.md) for details.