Skip to content

Commit cf1d6b8

Browse files
authored
Merge pull request #846 from shubhamashish33/community
Created URL Shortner
2 parents e96e1d1 + 667494a commit cf1d6b8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

61/ShubhamAshish/URLShortner.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import streamlit as st
2+
import pyperclip
3+
import pyshorteners
4+
5+
6+
7+
st.title("URL Shortner")
8+
st.write("Enter the URL to shorten")
9+
url = st.text_input("URL")
10+
if st.button("Shorten"):
11+
shortener = pyshorteners.Shortener()
12+
x = shortener.tinyurl.short(url)
13+
st.write(x)
14+
pyperclip.copy(x)
15+
st.success('Copied to clipboard')

61/ShubhamAshish/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
streamlit
2+
pyperclip
3+
pyshorteners

0 commit comments

Comments
 (0)