对于python来说非常新,所以请轻松地对待我:)。下面的代码可以工作,但是我想知道是否有一种方法可以通过循环来更改indcode参数,这样我就不必重复requests.get了。data for business indcode 722bizdata_1 = document_1.json()
paraD[
我想知道,根据所传递的参数,构建请求体的最佳方法是什么。这些天来,我经常使用不同的REST API,我经常会开始与自己讨论如何设计所有不同的POST/GET函数。 def search(self, query, ??): Executes a searchquery, that is then stored and needs
to be called again to get results,因为参数都是可选的,尽管
我使用距离矩阵API来获得在两点之间旅行所需的时间,但我在调用get请求列表中的.json函数时遇到了问题。#creates url for API call to get travel time between two cities (my list includes 7 origin and destinationorigins="+{item}+"&destinations="+{row}+"&key="+{apikey}'