Page Inspector, MetaInspector as a service is a simple web service that allows you to scrape web pages for its meta data using the MetaInspector gem.
To provide an easy way to get a web page attributes in JSON format.
This is a Sinatra app, ready to be deployed into production on your server. This is extremely easy to do on Heroku, you just need to push it and you're ready to go.
The app has just one entry point, that accepts a single parameter for the URL to be shown, here's an example:
http://pageinspectordemo.herokuapp.com/scrape?url=https://github.com
This will fetch the URL and return its data in JSON format, that's all.
This app uses the OpenUriRedirections gem, that patches Ruby's OpenURI to allow redirections from HTTP to HTTPS and vice versa.
To be done.
bundle install
We use the rerun
gem so that it detects changes in the filesystem and reloads the app automatically.
rerun 'ruby app.rb'
The local server will be accessible at http://localhost:4567
This is free open source software uses the MIT license.