Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46cf45c

Browse files
added README and improvements
1 parent 7698589 commit 46cf45c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

‎URL-Shortener/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Url Shortener
2+
3+
Long URLs are not easy to handle, they are more manageable. Your URLs should be short and sweet. That’s because long URLs confuse Google and other search engines. Short Urls are easy to share, and they can help to track and compile click data(One of the reasons that bit.ly has received so much attention lately).
4+
5+
**pyshorteners** is a Python lib to help you short and expand urls using the most famous URL Shorteners available. It has many implemented APIs (Bit.ly, Chilp.it, Cutt.ly, etc.)
6+

‎URL-Shortener/url-shortener.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import pyshorteners
22

3-
url = input("Enter URL: ")
43

5-
print ("URL after Shortening : ", pyshorteners.Shortener().tinyurl.short(url))
4+
def shorten_url(url):
5+
return pyshorteners.Shortener().tinyurl.short(url)
6+
7+
8+
url = input("Enter URL: ")
9+
print ("URL after Shortening : ", shorten_url(url))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /