Created
July 4, 2021 09:09
-
-
Save Rishbah-76/6509e9c10ba9d115587a7d765495b66b to your computer and use it in GitHub Desktop.
This file contains 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
vehicle_reg_no = UP00XX0000 #NumberPlate deteted | |
username = <Enter your siteID> #API_user name | |
url = "http://www.regcheck.org.uk/api/reg.asmx/CheckIndia?RegistrationNumber=" + vehicle_reg_no + "&username="+username | |
url=url.replace(" ","%20") | |
r = requests.get(url) | |
n = xmltodict.parse(r.content) | |
k = json.dumps(n) | |
df = json.loads(k) | |
l=df["Vehicle"]["vehicleJson"] | |
p=json.loads(l) | |
s="Your car's details are:\n"+"Owner name: "+str(p['Owner'])+"\n"+"Car Company: "+str(p['CarMake']['CurrentTextValue'])+"\n"+"Car Model: "+str(p['CarModel']['CurrentTextValue'])+"\n"+"Fuel Type: "+str(p['FuelType']['CurrentTextValue'])+"\n"+"Registration Year: "+str(p['RegistrationYear'])+"\n"+"Insurance: "+str(p['Insurance'])+"\n"+"Vehicle ID: "+str(p['VechileIdentificationNumber'])+"\n"+"Engine No.: "+str(p['EngineNumber'])+"\n"+"Location RTO: "+str(p['Location']) | |
print(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment