Created
September 20, 2018 05:28
-
-
Save shiv213/263b29c7821adccd501f00d8031afc49 to your computer and use it in GitHub Desktop.
Simple Python script to retrieve ngrok tunnel addresses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
r = requests.get('http://localhost:4040/api/tunnels') | |
datajson = r.json() | |
msg = "" | |
for i in datajson['tunnels']: | |
msg = msg + i['public_url'] + '\n' | |
print(msg) |
y tho
minecraft :)
bro, y como se hace para que en el mismo script se ejecute ngrok y luego obtener la URL ?
Puedes hacer os.system('ngrok http 80 --log=stdout >/dev/null &')
Tambien puedes usar urls = [tunnels['tunnels'][i]['public_url'] for i in range(len(tunnels['tunnels']))]
Gracias hermano 🙏🏽
El vie., 3 de febrero de 2023 4:38 p. m., Yaseen ***@***.***>
escribió:
… ***@***.**** commented on this gist.
------------------------------
Puedes hacer os.system('ngrok http 80 --log=stdout >/dev/null &')
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/263b29c7821adccd501f00d8031afc49#gistcomment-4459111>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR4F35YSKZOYGW5WUZ45HNDWVV3HDBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TEMBRGA3DQM5HORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
y tho