Skip to content

Instantly share code, notes, and snippets.

@wichert
Created January 25, 2016 12:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wichert/8b63370e4bdd82af77ea to your computer and use it in GitHub Desktop.
Save wichert/8b63370e4bdd82af77ea to your computer and use it in GitHub Desktop.
Python example for http://macvendors.co/
>>> import pprint
>>> import requests
>>> MAC_URL = 'http://macvendors.co/api/%s'
>>> r = requests.get(MAC_URL % 'BC:92:6B:A0:00:01')
>>> pprint.pprint(r.json())
{'result': {'address': '1 Infinite Loop Cupertino CA US 95014 ',
'company': 'Apple, Inc.',
'mac_prefix': 'BC:92:6B'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment