Use python recursion to get the response of http request

now I want to use Python to get web information recursively:

  1. Web page information is very simple. When I request url_one, I get a list, such as

    .

    [

    ]
    {
        "url":"url_1",
        "isEnd": "no"
    },
    {
        "url": "url_2",
        "isEnd": "yes"
    }

    ]

  2. if isEnd is no, then I will continue to request this url, until the isEnd of a url is yes.

how can I achieve this?

Apr.01,2021

there is no need for recursion, a for plus an if judgment is done. Or did you not express your ideas clearly?

Dictionary value
python
for i in list:

if i["isEnd"] == no:
    request
else:
    break

Menu