# 蓝奏云API逆向
蓝奏云是一个很小众的网盘工具,少有的不对存储总量和下载速度作限制的网盘。
这个Python包实现对文件的上传、创建分享、设置密码、获取下载直链等功能。
使用方式:
- 网址登陆,获取三个cookie信息:`PHPSESSID` 、`phpdisk_info`、 `ylogin`;
![image-20241107183724280](assets/Readme/image-20241107183724280.png)
- 导入`LanZouApi` 和 `LanZouCookie` 两个类,传入获取到的cookie,进行实例化;
```python
from zibuyu_lanzou import LanZouApi, LanZouCookie
cookie = LanZouCookie(
PHPSESSID="xxx",
ylogin="xxx",
phpdisk_info="xxx",
)
handler = LanZouApi(cookie)
```
之后就可以使用 `handler` 对象进行操作。
如果你有一个蓝奏云的分享链接,只是想单纯地获取下载直链,也可以使用 `get_direct_download_url`方法:
```python
from zibuyu_lanzou import get_direct_download_url
response = get_direct_download_url(
share_url='https://wwib.lanzoul.com/iQ6S62egfmvg',
password='vArk'
)
print(response) # 该文件的下载直链
```
Raw data
{
"_id": null,
"home_page": "https://github.com/zibuyu2015831/zibuyu-lanzou",
"name": "zibuyu-lanzou",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "zibuyu, zibuyu_lanzou, lanzou",
"author": "\u5b50\u4e0d\u8bed",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# \u84dd\u594f\u4e91API\u9006\u5411\n\n\u84dd\u594f\u4e91\u662f\u4e00\u4e2a\u5f88\u5c0f\u4f17\u7684\u7f51\u76d8\u5de5\u5177\uff0c\u5c11\u6709\u7684\u4e0d\u5bf9\u5b58\u50a8\u603b\u91cf\u548c\u4e0b\u8f7d\u901f\u5ea6\u4f5c\u9650\u5236\u7684\u7f51\u76d8\u3002\n\n\u8fd9\u4e2aPython\u5305\u5b9e\u73b0\u5bf9\u6587\u4ef6\u7684\u4e0a\u4f20\u3001\u521b\u5efa\u5206\u4eab\u3001\u8bbe\u7f6e\u5bc6\u7801\u3001\u83b7\u53d6\u4e0b\u8f7d\u76f4\u94fe\u7b49\u529f\u80fd\u3002\n\n\u4f7f\u7528\u65b9\u5f0f\uff1a\n\n- \u7f51\u5740\u767b\u9646\uff0c\u83b7\u53d6\u4e09\u4e2acookie\u4fe1\u606f\uff1a`PHPSESSID` \u3001`phpdisk_info`\u3001 `ylogin`\uff1b\n\n![image-20241107183724280](assets/Readme/image-20241107183724280.png)\n\n- \u5bfc\u5165`LanZouApi` \u548c `LanZouCookie` \u4e24\u4e2a\u7c7b\uff0c\u4f20\u5165\u83b7\u53d6\u5230\u7684cookie\uff0c\u8fdb\u884c\u5b9e\u4f8b\u5316\uff1b\n\n```python\nfrom zibuyu_lanzou import LanZouApi, LanZouCookie\n\ncookie = LanZouCookie(\n\tPHPSESSID=\"xxx\",\n\tylogin=\"xxx\",\n\tphpdisk_info=\"xxx\",\n)\n\nhandler = LanZouApi(cookie)\n```\n\n\u4e4b\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528 `handler` \u5bf9\u8c61\u8fdb\u884c\u64cd\u4f5c\u3002\n\n\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u84dd\u594f\u4e91\u7684\u5206\u4eab\u94fe\u63a5\uff0c\u53ea\u662f\u60f3\u5355\u7eaf\u5730\u83b7\u53d6\u4e0b\u8f7d\u76f4\u94fe\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 `get_direct_download_url`\u65b9\u6cd5\uff1a\n\n\n\n```python\nfrom zibuyu_lanzou import get_direct_download_url\n\nresponse = get_direct_download_url(\n share_url='https://wwib.lanzoul.com/iQ6S62egfmvg',\n password='vArk'\n)\n\nprint(response) # \u8be5\u6587\u4ef6\u7684\u4e0b\u8f7d\u76f4\u94fe\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u5b50\u4e0d\u8bed\u4e2a\u4eba\u5de5\u5177\u5305-\u84dd\u594f\u4e91API\u8c03\u7528",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/zibuyu2015831/zibuyu-lanzou"
},
"split_keywords": [
"zibuyu",
" zibuyu_lanzou",
" lanzou"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b0faf6aa01d3b50e4fd497af6d653bd24649cec22c6593f3767c017853d071c8",
"md5": "0cc29f49a8bde72384833d00b74da82f",
"sha256": "1c8802576de897787aae15a7542dc083a074e073025380c76ab53b00291824a2"
},
"downloads": -1,
"filename": "zibuyu_lanzou-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0cc29f49a8bde72384833d00b74da82f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 1997,
"upload_time": "2024-11-07T11:02:11",
"upload_time_iso_8601": "2024-11-07T11:02:11.875661Z",
"url": "https://files.pythonhosted.org/packages/b0/fa/f6aa01d3b50e4fd497af6d653bd24649cec22c6593f3767c017853d071c8/zibuyu_lanzou-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-07 11:02:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zibuyu2015831",
"github_project": "zibuyu-lanzou",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": [
[
"==",
"2.31.0"
]
]
},
{
"name": "fake-useragent",
"specs": [
[
"==",
"1.5.1"
]
]
},
{
"name": "requests-toolbelt",
"specs": [
[
"==",
"1.0.0"
]
]
}
],
"lcname": "zibuyu-lanzou"
}