Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python请求模块-剥离字典内容_Python_Python 3.x_Dictionary_Python Requests_Python 3.7 - Fatal编程技术网

Python请求模块-剥离字典内容

Python请求模块-剥离字典内容,python,python-3.x,dictionary,python-requests,python-3.7,Python,Python 3.x,Dictionary,Python Requests,Python 3.7,我试图从下面指定的链接调用一个web请求,根据您阅读本文时的不同,该请求可能略有变化,但我只需要其中的一个特定部分,这都是一行。从部件构建:++Fortnite+Release-12.50-CL-13193885-Windows我想保留++Fortnite+Release-12.50-CL-13193885-Windows部件 我需要使用什么代码?这就是我目前所拥有的 url=https://fortnite-api.com/v2/aes response=requests.geturl upd

我试图从下面指定的链接调用一个web请求,根据您阅读本文时的不同,该请求可能略有变化,但我只需要其中的一个特定部分,这都是一行。从部件构建:++Fortnite+Release-12.50-CL-13193885-Windows我想保留++Fortnite+Release-12.50-CL-13193885-Windows部件

我需要使用什么代码?这就是我目前所拥有的

url=https://fortnite-api.com/v2/aes response=requests.geturl updateloop=response.json[build]

链接:

照办

updateloop = response.json()["data"]["build"].replace("++Fortnite+Release-", "")
输出

'12.50-CL-13193885-Windows'

我投票结束这个问题,因为这个问题没有具体的重点,似乎是更一般的计算建议,而不是编码帮助