Using Akka-HTTP and Open Graph protocol to retrieve data from Url

Reading Time: 2 minutes

Hello All, In this blog we are using Akka-HTTP and Open Graph protocol to retrieve data from Url

Open Graph protocol

 

This protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.

While many different technologies and schemas exist and could be combined together, there isn’t a single technology which provides enough information to richly represent any web page within the social graph.

With the help of this protocol and Akka-HTTP, I developed a mini project which can retrieve data from an URL like

1. https://www.youtube.com/

2. https://soundcloud.com/stream

You can find complete code here.

build.sbt file of the project contains all dependency.

Open Graph protocol

UrlMetaDataActor.scala file to get the data from URL

Open Graph protocol

Example to retrieving data from Url.

result

Resources

Open Graph protocol – http://ogp.me/

Akka HTTP- http://doc.akka.io/docs/akka/2.4.12/scala/http/

Thanks !!!