【发布时间】:2019-08-13 14:59:21
【问题描述】:
我需要跑步
curl -H "Accept: application/json+v6" -H "x-api-key: <your_api_key>" \https://beta.check-mot.service.gov.uk/trade/vehicles/mot-tests\?registration=ZZ99ABC
在 Python 2.7 中。我已经研究过使用请求,但我不确定如何专门为上述命令构建它。
帮助赞赏
【问题讨论】:
-
看看this answer - 它建议使用
urllib2,添加您需要的标题,以及阅读响应。 -
您是否已经尝试过curl.trillworks.com 以了解使用请求库的想法?
标签: python python-2.7 curl python-requests anpr