I am using ngrok to ofcourse portforward my local system but when getting tunnels names ngrok.get_tunnels()
it outputs in weird way so when I check the type of its output it shows that it is a class. Output like this
[<NgrokTunnel: "http://4527-124-123-122-140.ngrok.io" -> "http://localhost:3243">, <NgrokTunnel: "https://4527-124-123-122-140.ngrok.io" -> "http://localhost:3243">]
How can I take the URL names from it like I want in this way
HTTP tunnel: http://4527-124-123-122-140.ngrok.io
HTTPS tunnel: https://4527-124-123-122-140.ngrok.io
Below is my code which is just 3 lines to give the output
from pyngrok install ngrok
ngrok.connect(5000, "http")
ngrok.get_tunnels()
You have to save the return value of
get_tunnels
, so that you can iterate over it.