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 256dd78

Browse files
Merge pull request avinashkranjan#385 from mudit-mhjn/master
avinashkranjan#9 Added a README and minor improvements
2 parents 7698589 + 0d2c3af commit 256dd78

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

‎URL-Shortener/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
7+
Here's a demo of how to use the url-shortener.py script:
8+
9+
![alt text](working.JPG)
10+

‎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))

‎URL-Shortener/working.JPG

33.5 KB
Loading[フレーム]

0 commit comments

Comments
(0)

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