Created
December 30, 2018 17:41
-
-
Save gastonfartek/e19f12ca99b77477209fb16d3dbcf46d to your computer and use it in GitHub Desktop.
Python test
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
import json | |
from urllib.request import urlopen | |
response = urlopen('https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin/1HD1BX5158Y047710?format=json') | |
responseData = response.read(); | |
json = json.loads(responseData) | |
data = list(filter(lambda r: r['VariableId'] == 26 or r['VariableId'] == 28 or r['VariableId'] == 29, json['Results'])) | |
print(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment