Skip to content

Instantly share code, notes, and snippets.

@benjohnde
Last active May 18, 2017 08:21
Show Gist options
  • Save benjohnde/a03ce9d966fbeabe7471717f0022ebca to your computer and use it in GitHub Desktop.
Save benjohnde/a03ce9d966fbeabe7471717f0022ebca to your computer and use it in GitHub Desktop.
import requests
device_list = [{
"manufacturer": "LGE",
"model": "Nexus 5"
}, {
"manufacturer": "Motorola",
"model": "MotoG2"
}, {
"manufacturer": "LGE",
"model": "LG-K350N"
}, {
"manufacturer": "LGE",
"model": "LG-K35n"
}, {
"manufacturer": "Samsung",
"model": "SM-A310F"
}, {
"manufacturer": "Motorola",
"model": "MotoG3"
}, {
"manufacturer": "Samsung",
"model": "SM-A510F"
}, {
"manufacturer": "Samsung",
"model": "SM-G531F"
}, {
"manufacturer": "Huawei",
"model": "HUAWEI GRA-L09"
}, {
"manufacturer": "Huawei",
"model": "PLK-L01"
}, {
"manufacturer": "Huawei",
"model": "Nexus 6P"
}, {
"manufacturer": "HTC",
"model": "HTC 10"
}, {
"manufacturer": "LGE",
"model": "LG-H850"
}, {
"manufacturer": "LGE",
"model": "LG-H815"
}, {
"manufacturer": "Huawei",
"model": "EVA-L09"
}, {
"manufacturer": "LGE",
"model": "Nexus 5X"
}, {
"manufacturer": "Kruger&Matz",
"model": "Kruger&Matz MOVE 6"
}, {
"manufacturer": "Samsung",
"model": "GT-I9195"
}, {
"manufacturer": "Samsung",
"model": "SM-G800F"
}, {
"manufacturer": "Samsung",
"model": "SM-G930F"
}, {
"manufacturer": "Samsung",
"model": "SM-G920F"
}, {
"manufacturer": "Samsung",
"model": "GT-I9515"
}, {
"manufacturer": "Samsung",
"model": "SM-G900F"
}]
for device in device_list:
manufacturer = device["manufacturer"]
model = device["model"]
payload = {
"os": "Android",
"version": "25",
"manufacturer": manufacturer,
"model": model
}
r = requests.get("https://server.quantoncal.com/osdevice", params=payload)
return_message = r.json()["message"]
response = u"\u2717"
if return_message == "Ok":
response = u"\u2713"
print("Checking '{} {}': {}".format(manufacturer, model, response))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment