We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee51299 commit 1705131Copy full SHA for 1705131
requirements.txt
@@ -0,0 +1 @@
1
+bitly-api==0.3
url-shortener/README.md
@@ -0,0 +1,4 @@
+# URL Shortener
2
+
3
+[Link](https://towardsdatascience.com/best-apis-for-url-shortening-using-python-2db09d1f86f0)
4
+Library Repository: [bitly/bitly-api-python](https://github.com/bitly/bitly-api-python)
url-shortener/main.py
@@ -0,0 +1,8 @@
+import bitly_api
+BITLY_ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"
+ACCESS = bitly_api.Connection(access_token=BITLY_ACCESS_TOKEN)
5
+SHORT_URL = ACCESS.shorten(str(input()))
6
7
+if __name__ == "__main__":
8
+ print(f"Short URL = {SHORT_URL['url']}")
0 commit comments