-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Meirza Arson edited this page Jan 25, 2017
·
1 revision
Clip adalah program yang berfungsi untuk menggali ringkasan informasi dai suatu web.
Clip ditulis dengan menggunakan bahasa pemrograman GO. Cara kerja clip adalah
ketika ada request dari client untuk mencari summary sebuah website, maka
clip akan membuka website tersebut dan membaca summary-nya berdasarkan :
- OpenGraph Protocol >> http://ogp.me/
- Twitter Cards >> https://dev.twitter.com/cards/overview
- HTML Tag
Ketiganya dibaca menggunakan HTML Tokenizer di GO
{
"errors": null,
"data": {
"url": "https://www.youtube.com/watch?v=50efl4S8VQc",
"title": "Sebangsa App (Versi Bahasa)",
"description": "Sebangsa adalah platform sosial dan mobile baru yang dikembangkan dan dirancang untuk pengguna Indonesia. Gunakan Sebangsa untuk berhubungan dengan teman And...",
"content_type": "html",
"site_name": "YouTube",
"image_thumb": "https://s.sebangsa.net/clip/i.ytimg.com/e95abe5367ab192d3c2f652aa4bff9c6.jpg",
"image_width": "360",
"image_height": "480",
"favicon_url": "https://s.sebangsa.net/clip/s.ytimg.com/6a3f1f7deb777289735e2b44874f7bb0.png",
"media_type": "video",
"media_url": "https://s.sebangsa.net/clip/www.youtube.com/96a4a5b50aae6e025e035bba914c0161.50efl4S8VQc",
"media_width": "1280",
"media_height": "720",
"published_date": "2014-07-25",
"Client": null
},
"meta": null
}- GIN https://github.com/gin-gonic/gin (HTTP web framework)
- iconv https://github.com/qiniu/iconv (Convert string to requested character encoding)
- Logrus https://github.com/sirupsen/logrus (Structured, pluggable logging for Go)
- godotenv https://github.com/joho/godotenv (Loads environment variables from
.env)