python-3.x 从结果中获取响应(CURL)[已关闭]

yhxst69z  于 2022-12-20  发布在  Python
关注(0)|答案(1)|浏览(114)

已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题?**添加详细信息并通过editing this post阐明问题。

3天前关闭。
Improve this question
我是Python的新手
我在创作这个剧本
我尝试 curl 一个URL并得到响应(A),现在我想从响应A得到响应(B

result = os.popen("curl https://raw.githubusercontent.com/SirdLay/test/main/test.txt").read()
index = os.popen("curl [what to be used here?]")
w8f9ii69

w8f9ii691#

response1 = os.popen("curl https://raw.githubusercontent.com/SirdLay/test/main/test.txt").read()
url = response1[<key>] 
# key is some key in the response1.
# You can print the response1 to see the object.
# For your particular case you dont need a key.
# so you can use
url =  response1
response2 =  os.popen("curl " + url).read()

相关问题