Skip to content

Instantly share code, notes, and snippets.

@tawateer
Last active December 24, 2015 15:05
Show Gist options
  • Save tawateer/78249748003fc07acede to your computer and use it in GitHub Desktop.
Save tawateer/78249748003fc07acede to your computer and use it in GitHub Desktop.
从 DELL 官网 API 通过 SN 查询「快速服务编码」
#!/bin/env python
import requests
def get_servicetag_from_sn(sn):
url = "http://www.dell.com/support/troubleshooting/cn/zh/cndhs1/ExpressService/ExpressService/GetSpecificExpressServiceTag"
data = {
"TagCode": sn
}
ret = requests.post(url, json=data)
return ret.json()["ExpressServiceTag"]
if __name__ == "__main__":
print get_servicetag_from_sn("D7SCXX1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment