I have a long json object which contains URL links in the value, these links can be at any depth and with any key. The depth and key is not known. Ex.,
data = {
"name": "John Doe",
"a": "https:/example.com",
"b": {
"c": "https://example.com/path",
"d": {
"e": "https://example.com/abc/?q=u",
}
}
}
I want to extract all links in a list like
links = ["https://example.com", "https://example.com/path", "https://example.com/abc/?q=u"]
How can I extract all the links from the object using Python?
httporhttps. Any string without these protocols will not be treated as valid URL