新浪短链接生成器
该库主要用于生成新浪短链接,完美支持`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': '关于这个站点的简单描述'
}
Metadata
Release files for sina-shorturl 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sina-shorturl-0.1.tar.gz | 1.8 kB | Without provenance | Details for sina-shorturl-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sina_shorturl-0.1-py2.7.egg | Legacy Egg format | - | - | Details for sina_shorturl-0.1-py2.7.egg |
Total release size: 3.4 kB
Release files / sina-shorturl-0.1.tar.gz
| Download URL | sina-shorturl-0.1.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
158c9bb1eedf6f55f3f926a40e41b98b4be2774c749929eac28c1f36d28c6998
|
|
BLAKE2b-256 checksum How to use checksums |
4c91978c613d49fb830800b16898f4ca9135b59161ce06ed4046be7f6b317ad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sina_shorturl-0.1-py2.7.egg
| Download URL | sina_shorturl-0.1-py2.7.egg |
|---|---|
| Size | 1.6 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
6d5326245e876f3974f272ef7a7bdab06fef15e266a48ada30ffc9f968b5bb86
|
|
BLAKE2b-256 checksum How to use checksums |
60d3d8b328cdc2bd16565b2fba4e3b794b592c9031b1e732b64c1142b9309545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sina-shorturl 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.