Giter VIP home page Giter VIP logo

sniffles's Introduction

Sniffles

Description

Sniffles parses HTML pages and searches for common patterns suggesting a page is using a popular CMS or advertising platform as well as CSS and JS libraries.

The master branch is continuously tested against Rubies 1.9.3, 2.0.0, 2.1.0 thanks to the fantastic Travis-CI.

Current CI status: Build Status

What is a sniffer?

This library uses the term sniffer to refer to a pattern that determines where a page is using a particular platform or library. A sniffer may also include methods to extract other metadata once a platform or library has been identified.

Work in progress!

Sniffles should be considered a work in progress. Many of the matching patterns are little more than regular expressions matching commonly found "Powered by" text.

If you find a bug or want to add a feature to a sniffer, open an issue! The URL of an example page that Sniffles misidentifies is help. Pull requests are, of course, greatly appreciated.

Installation

Rubygems:

gem install sniffles

Bundler:

gem 'sniffles'

Usage

require 'sniffles'
require 'typhoeus' # Optional: Use your favorite HTTP client.

response = Typhoeus::Request.get("http://www.fastly.com/")

You can pass in a single sniffer:

Sniffles.sniff(response.body, :google_analytics) 
# => { :google_analytics=> { :found=>true, :ua=>"UA-25770359-1" } }

Or multiple sniffers:

Sniffles.sniff(response.body, :google_analytics, :kissmetrics)
# => { :google_analytics=> { :found=>true, :ua=>"UA-25770359-1"}, :kissmetrics=>{:found=>false} }

Or an entire group of sniffers:

Sniffles.sniff(response.body, :analytics)
# => {:chartbeat=>{:found=>false},
# :clicky=>{:found=>false},
# :google_analytics=>{:found=>true, :ua=>"UA-185209-2"},
# :kissmetrics=>{:found=>false},
# :mixpanel=>{:found=>false},
# :quantcast=>{:found=>false}}

Sniffers (HEAD)

Here are a list of currently implemented sniffers, grouped by category. You can see a list of unimplemented sniffers by filtering issues by "sniffer".

Advertising

  • AdSense
  • BuySellAds
  • Casale
  • Kontera
  • TheDeck
  • TribalFusion

Analytics

  • ChartBeat
  • Clicky
  • Google Analytics
  • Facebook Insights
  • KISSMetrics
  • MixPanel
  • Piwik
  • Quantcast

CMS

  • BigCommerce
  • Blogger
  • CS-Cart
  • Drupal
  • FlatPress
  • Invision
  • Joomla
  • Magento
  • MovableType
  • MyBB
  • osCommerce
  • phpBB
  • Posterous
  • PrestaShop
  • Shopify
  • Sitefinity
  • Tumblr
  • TypePad
  • Vanilla
  • vBulletin
  • WordPress
  • Xcart
  • XenForo
  • ZenCart

Javascript

  • jQuery

Contributors

For a complete list see github.

Special Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.