-
-
Save karanjagota/fc7d810a1ea9c6025e40bded77338c39 to your computer and use it in GitHub Desktop.
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
# displaying API data | |
API_URL = 'https://cleanuri.com/api/v1/shorten' | |
st.subheader('URL SHORTNER') | |
_url = st.text_input('Enter URL') | |
pressed = st.button('Get Short Link') | |
if pressed: | |
if _url !='': | |
data = {'url': _url} | |
r = requests.post(API_URL, data=data) | |
st.write(r.json()) | |
else: | |
st.write('Please enter the right URL first') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment