generate the short url server by sina.it
Project description
该库主要用于生成新浪短链接,完美支持`http://sina.lt`所有的短链接后缀,包括:
sina.it
t.cn(默认)
dwz.cn(仅供部分知名网站使用)
qq.cn.hn(仅供社交网站使用)
tb.cn.hn(仅供购物网站使用)
jd.cn.hn(仅供购物网站使用)
tinyurl.com
qr.net
goo.gl(仅供海外用户使用)
is.gd(仅供海外用户使用)
j.mp(仅供海外用户使用)
bit.ly(仅供海外用户使用)
其使用方法如下
from sina_shorturl import generate url = "The given website" data = generate(url)
我们只需要从`sina_shorturl`中导入generate函数,然后将给定的网站url作为参数传入即可。默认情况下为`t.cn`,如果想生成其他的后缀,可以指定`suffix`参数。例如
data = generate(url,suffix="sina.it")
我们只需要在suffix参数中填上上述支持的短链接后缀即可。 返回的结果可能如下
{
'short_url': 'http://t.cn/xxxx',
'title': '关于这个站点的简单描述'
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sina-shorturl-0.1.tar.gz.
File metadata
- Download URL: sina-shorturl-0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
158c9bb1eedf6f55f3f926a40e41b98b4be2774c749929eac28c1f36d28c6998
|
|
| MD5 |
681647c8658b2c3de90b774399a920f7
|
|
| BLAKE2b-256 |
4c91978c613d49fb830800b16898f4ca9135b59161ce06ed4046be7f6b317ad4
|
File details
Details for the file sina_shorturl-0.1-py2.7.egg.
File metadata
- Download URL: sina_shorturl-0.1-py2.7.egg
- Upload date:
- Size: 1.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d5326245e876f3974f272ef7a7bdab06fef15e266a48ada30ffc9f968b5bb86
|
|
| MD5 |
380696e57e27b13108c0f97d1efc6570
|
|
| BLAKE2b-256 |
60d3d8b328cdc2bd16565b2fba4e3b794b592c9031b1e732b64c1142b9309545
|