# TSDK
淘宝爬虫SDK,用于淘宝开放平台或淘宝登录爬取
## 淘宝系列爬虫系列SDK
- 第三版
```python
from TSDK.api.taobao.h5 import TaobaoH5
client = TaobaoH5()
# 触发登录显示二维码,扫码后即可登录
loginStatus = client.qrLogin()
if not loginStatus:
print('登录失败')
```
### 淘宝H5API的使用
1. 在浏览器中找到请求的接口,例如:https://h5api.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?jsv=2.4.8&appKey=12574478&t=1535803615228&sign=fa7b5f3312f9727a25662162bf502aff&api=mtop.taobao.detail.getdetail&v=6.0&dataType=json&ttid=2017%40taobao_h5_6.6.0&AntiCreep=true&type=json&data=%7B%22itemNumId%22%3A%224362046464%22%7D
这是请求商品详情的接口
2. 将链接中的参数提取然后传入请求中
Raw data
{
"_id": null,
"home_page": "https://github.com/xinlingqudongX/TSDK",
"name": "TSDK",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "login, taobao, qrcode",
"author": "xinlingqudongX",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2d/f7/52bc52b763b394607dfb5a3705d3c2ff815d8fbb60921e9cf97413962230/tsdk-0.1.2.tar.gz",
"platform": null,
"description": "# TSDK\n\u6dd8\u5b9d\u722c\u866bSDK\uff0c\u7528\u4e8e\u6dd8\u5b9d\u5f00\u653e\u5e73\u53f0\u6216\u6dd8\u5b9d\u767b\u5f55\u722c\u53d6\n\n\n## \u6dd8\u5b9d\u7cfb\u5217\u722c\u866b\u7cfb\u5217SDK\n \n - \u7b2c\u4e09\u7248\n\n```python\nfrom TSDK.api.taobao.h5 import TaobaoH5\n\nclient = TaobaoH5()\n# \u89e6\u53d1\u767b\u5f55\u663e\u793a\u4e8c\u7ef4\u7801\uff0c\u626b\u7801\u540e\u5373\u53ef\u767b\u5f55\nloginStatus = client.qrLogin()\nif not loginStatus:\n print('\u767b\u5f55\u5931\u8d25')\n```\n\n### \u6dd8\u5b9dH5API\u7684\u4f7f\u7528\n 1. \u5728\u6d4f\u89c8\u5668\u4e2d\u627e\u5230\u8bf7\u6c42\u7684\u63a5\u53e3\uff0c\u4f8b\u5982\uff1ahttps://h5api.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?jsv=2.4.8&appKey=12574478&t=1535803615228&sign=fa7b5f3312f9727a25662162bf502aff&api=mtop.taobao.detail.getdetail&v=6.0&dataType=json&ttid=2017%40taobao_h5_6.6.0&AntiCreep=true&type=json&data=%7B%22itemNumId%22%3A%224362046464%22%7D\n \u8fd9\u662f\u8bf7\u6c42\u5546\u54c1\u8be6\u60c5\u7684\u63a5\u53e3\n\n 2. \u5c06\u94fe\u63a5\u4e2d\u7684\u53c2\u6570\u63d0\u53d6\u7136\u540e\u4f20\u5165\u8bf7\u6c42\u4e2d\n \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "taobao login",
"version": "0.1.2",
"project_urls": {
"Documentation": "https://github.com/xinlingqudongX/TSDK",
"Homepage": "https://github.com/xinlingqudongX/TSDK",
"Repository": "https://github.com/xinlingqudongX/TSDK"
},
"split_keywords": [
"login",
" taobao",
" qrcode"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "674d436e3c6cb1ccb594810b7ac1d0bcb7f6bf72e03c692a72af758543e105b2",
"md5": "89b5da330da0932af570f4e2fa95fff1",
"sha256": "2f46205dcbde4629dc133a16f2365f9d3b1c9d87601bdf35932d9fe747edd625"
},
"downloads": -1,
"filename": "tsdk-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "89b5da330da0932af570f4e2fa95fff1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 144211,
"upload_time": "2024-08-12T13:29:02",
"upload_time_iso_8601": "2024-08-12T13:29:02.524513Z",
"url": "https://files.pythonhosted.org/packages/67/4d/436e3c6cb1ccb594810b7ac1d0bcb7f6bf72e03c692a72af758543e105b2/tsdk-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2df752bc52b763b394607dfb5a3705d3c2ff815d8fbb60921e9cf97413962230",
"md5": "8d3b7d0901dfae3250e352a46727975a",
"sha256": "7054fe33c9d4a3cb54a350670959091759e0e56175948c294c0cfae04feb913a"
},
"downloads": -1,
"filename": "tsdk-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "8d3b7d0901dfae3250e352a46727975a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 259563,
"upload_time": "2024-08-12T13:29:05",
"upload_time_iso_8601": "2024-08-12T13:29:05.091476Z",
"url": "https://files.pythonhosted.org/packages/2d/f7/52bc52b763b394607dfb5a3705d3c2ff815d8fbb60921e9cf97413962230/tsdk-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 13:29:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xinlingqudongX",
"github_project": "TSDK",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tsdk"
}