Last active
December 24, 2015 15:05
-
-
Save tawateer/78249748003fc07acede to your computer and use it in GitHub Desktop.
从 DELL 官网 API 通过 SN 查询「快速服务编码」
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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