MAC vendor lookup: Difference between revisions

→‎{{header|Python}}: added simple Python version
(→‎{{header|Python}}: added simple Python version)
Line 167:
Roku, Inc.
N/A
</pre>
 
=={{header|Python}}==
<lang python>import requests
 
for addr in ['88:53:2E:67:07:BE', 'FC:FB:FB:01:FA:21',
'D4:F4:6F:C9:EF:8D', '23:45:67']:
r = requests.get('http://api.macvendors.com/' + addr)
print(addr, r.text)</lang>
{{out}}
<pre>88:53:2E:67:07:BE Intel Corporate
FC:FB:FB:01:FA:21 Cisco Systems, Inc
D4:F4:6F:C9:EF:8D Apple, Inc.
23:45:67 Vendor not found
</pre>
 
Anonymous user