1. pyshorteners: 2. pyshorteners + Bitly: 3. short_url: python import pyshorteners shortener = pyshorteners.Shortener(provider='TinyURL', api_key='your_api_key') short_url = shortener.short('http://example.com') print(short_url) python import pyshorteners shortener = pyshorteners.Shortener(provider='Bit.ly', api_key='your_api_key') short_url = shortener.short('http://example.com') print(short_url) python import short_url shortened_url = short_url.encode_url(1234567890) print(shortened_url)


上一篇:
下一篇:
切换中文