Skip to content

Commit d257ea5

Browse files
New project addition-Link Shortener (#187)
* Create source-code.py * Create README.md * Update source-code.py Co-authored-by: Prateek Chanda <[email protected]>
1 parent f9356ee commit d257ea5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Diff for: Code-Sleep-Python/Link Shortener/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
3+
<h2 align="center">Link Shortener</h3>
4+
5+
<p align="center">
6+
Python Application | 5 lines of code
7+
<br>
8+
<br />
9+
</p>
10+
</p>
11+
12+
You can create a `Python` program which can be used to shorten a big links. We'll use a shortening web service named `tinyurl`. You need to give your link in the terminal and you'll get the shorten link in the print-screen.
13+
```
14+
What the program does?
15+
16+
- You've to give your big link in the terminal
17+
- Program will use tinyurl server for shortening the link without using any browser
18+
- Shortened link will pass by print() function
19+
```
20+
### Requirements
21+
22+
* Python
23+
* Python Libraries: `pyshorteners`

Diff for: Code-Sleep-Python/Link Shortener/source-code.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pyshorteners
2+
3+
link = input("enter the link:")
4+
shortener = pyshorteners.Shortener()
5+
6+
x = shortener.tinyurl.short(link)
7+
8+
print(x)

0 commit comments

Comments
 (0)