{"_id":"@blueislandx/island-taobao-bypass","_rev":"2-8dd1bd2dd99395dc0e8bbac03489e8bb","name":"@blueislandx/island-taobao-bypass","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@blueislandx/island-taobao-bypass","version":"1.1.0","description":"Island (小蓝岛) 淘宝商品数字 id 转联盟字符 id 解决方案 (开源版)","main":"taobao/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Taobao-Bypass.git"},"keywords":["taobao","taobaoke","alimama"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Taobao-Bypass/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Taobao-Bypass#readme","dependencies":{"island-union-sdk":"^1.0.6"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7"},"directories":{"test":"test"},"gitHead":"3c7a76299ca4a2f941c9ca155b6256d8b80c722d","_id":"@blueislandx/island-taobao-bypass@1.1.0","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-TXAqhviAnunhfpCLS6mhevwbu5+Y04LnIplrbas0E+bErVIaQ42eiDAAccSj/WZ36jvIpS2RwWcczimyiVnYlQ==","shasum":"98fe02c26b8d4fe94573cced13a4dcab82943af4","tarball":"https://registry.npmjs.org/@blueislandx/island-taobao-bypass/-/island-taobao-bypass-1.1.0.tgz","fileCount":9,"unpackedSize":24526,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFye3crsicNdS7wvOcftslGeYRzZtv38YdNry8WJhf1TAiEAxfM4jCpnHempYpiJft9U/b1UrPeITcM7vGnJU1/vxYY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9ayqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5xg/+KXLiq89drO6WXNX9rDE8Il14b/HK/tzqLV90Z13mSaNhV5ho\r\n7+IxjzZDhR/wbx6G3Xd81PTI+PldI1zKN0rREvjajv9ruZb1gOdo5UYGZmlH\r\nO1SUjcF0gu/YYKhvckv5OSmF4eDRPapqwPnqAyZXpXGSfXvO/DC5h5YvbqZh\r\nEmFIMGJS6FUmN3g5VlLXXBHTf2oea+t45MrhP1+V2CvCIKE9dkKhDbIZ37tt\r\nUmKoUWOVx8vtINlWBl32igu60W+MtycMboZzbYaOSYsPwlf+AoL7wQdCi6Yi\r\nHZxADDV4FIZ5MZ1EYPqWeqMO4wXWssK5ATThIBb5Wuuh5Ku7hfMGxFMiXGtq\r\nyIJHlinTqXj7FYvKqu0poZxjnWw7KSiNSDoJG2XZhgqhP+rLdZMLQn/DCAm9\r\nx6aZPVUOZAwgpEydeY9MAzBN5cRdeiIord4ojxSdS12WHmtt21JRHZHzviRh\r\nC8dV/loKODrncblY2CmmEonPbq9h70velW/HfK8LsQECWbl7DH8la0QlvaeZ\r\nA/Rg15bMDJTqoyuuhM1sJ0e2EQ4nHqENaAP/3wNfzuPCzZZGsh41+xtxHWwa\r\n8NDFrpuXWIMQcpGh67G9v3kkMiRX1VKUaVgJtSoP4nbNvac6nK1udrQu5IDv\r\nWSxsDxgaL5mercrVV09vBp5pWepF/AUQ7pU=\r\n=8vjn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-taobao-bypass_1.1.0_1677044905727_0.6028287742127323"},"_hasShrinkwrap":false},"1.1.1":{"name":"@blueislandx/island-taobao-bypass","version":"1.1.1","description":"Island (小蓝岛) 淘宝商品数字 id 转联盟字符 id 解决方案 (开源版)","main":"taobao/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Taobao-Bypass.git"},"keywords":["taobao","taobaoke","alimama"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Taobao-Bypass/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Taobao-Bypass#readme","dependencies":{"@blueislandx/island-union-sdk":"^1.1.1"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7"},"directories":{"test":"test"},"types":"./taobao/index.d.ts","gitHead":"41461a1f81ed344cd1b8e3c204373fc7dd93d21c","_id":"@blueislandx/island-taobao-bypass@1.1.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-3UXM137F6xAcMdmN/6KUmpiFe76l6FLXuM1aRlSzrz9WbvFDSdRUnrUaID0h9t5BsfBkRWF5uHt1YQKacspM4A==","shasum":"209096059f55d24c073aba5bf403a9e4832c25e0","tarball":"https://registry.npmjs.org/@blueislandx/island-taobao-bypass/-/island-taobao-bypass-1.1.1.tgz","fileCount":11,"unpackedSize":24960,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6lpoB2SWyKYQmGJoiUi1ILgWkWx+/w8atngcaVhu0lAIge7Bk21K1nQKY45V1lzvvKwc1fhr9uTci46esK7g82Fs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+d0HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1axAAgUUO4kbXu5wQr9vYJ8/xbzIMnBBaL9c3LNf+sh0mMT4XxEPp\r\nJBzNU4qeAQQCVlq67ud4uA75FiB/5kPIeE90SXfAupSxAKT0NjmKnddKjHa/\r\nlWSQdNgclCAUoFIJtIYth1PGQq8QWxCBzQQx2Nl7R4JYTbjKzpx5ncYHFQmj\r\n1dgrZyyRqhVT1B+9bPTwP/CGW+LQ/YNLwr++0oIeZUjl+9qk90a1WDSdUH0f\r\nBdaFWs4lmqYOxOXsk7MkT67YaNHpQ69LFfTNDjtZZoGd0nmLncUWZp4l2Rp+\r\nveC5+HGrwddljH/urtSVChoEPbv0f/oMZmuCOLfoupQRGDexnx7B9flCyOU2\r\nYRNgXjE1tHwCudPEaF1bptwlzGY39NtjF8qKuWFaiVFVnfHwulvH2nHhNJKe\r\n5g19vm/d8gRhSRBmB9bnjt29BWaNt79M407XzK1XV3s4KiYxOrySqH7ownun\r\n2p5XgmT63kQyBocwxDvdmSyM3R3i64Z1cUsIlJjj52TNiM8IVYNLO4RX81Lt\r\ni0W+sUSMAlFSAm8s82V5f3CIxQWr21FpgTOadO7ZBfPRVnCEisT4Wl+JvceC\r\nsRKWvZxtex3G9ii8oBNsjH4uirUbpEbvMD8Y+aGXbuptJxN21ggYb3kJtkWX\r\n1IktLXpvNN9BMf1lrBOkcsGs2uC0G0t7SKo=\r\n=dqm0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-taobao-bypass_1.1.1_1677319431232_0.7089629230701107"},"_hasShrinkwrap":false},"1.1.2":{"name":"@blueislandx/island-taobao-bypass","version":"1.1.2","description":"Island (小蓝岛) 淘宝商品数字 id 转联盟字符 id 解决方案 (开源版)","main":"taobao/index.js","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Taobao-Bypass.git"},"keywords":["taobao","taobaoke","alimama"],"author":{"name":"开封小蓝岛科技有限公司"},"license":"MIT","bugs":{"url":"https://github.com/Blue-Island-X/Island-Taobao-Bypass/issues"},"homepage":"https://github.com/Blue-Island-X/Island-Taobao-Bypass#readme","dependencies":{"@blueislandx/island-union-sdk":"^1.1.2"},"devDependencies":{"@types/crypto-js":"^4.1.1","@types/node":"^18.13.0","@types/qs":"^6.9.7"},"directories":{"test":"test"},"types":"./taobao/index.d.ts","gitHead":"dd1016269aa1746fd0424b2716afedffef3c869f","_id":"@blueislandx/island-taobao-bypass@1.1.2","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-Nk5JHPgae1Z4Ns1FY6vIsCxsB55/TWw90PsbqOWno8sPRsBSqJMnTRuB7jeXrqY1SIZmGSfLNYyn5v1z4v1hKg==","shasum":"c1d09a01b7c791f4a15fa680c52f97788f6d1084","tarball":"https://registry.npmjs.org/@blueislandx/island-taobao-bypass/-/island-taobao-bypass-1.1.2.tgz","fileCount":14,"unpackedSize":25885,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFjEiJbsHo7KsS03gR+/9h/0FrMfJXWdx1G3moIELMMQAiEAo+PPGZG/3nThooddfJtc1CE+VC26yCWxlXeduc7EH5U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/szBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrE0g//RceWgwijoyn8SVTpW2EIRqSGI4xGhP1zIgDNk5KdhBw7PZxY\r\n+Cly4dDZUsJyD136qbZeoT69S0x5BK8RGV0D8HLR2fUboYamYLjiBWOl+OXz\r\nJEa3Jca+J4ENgW5xbdcR2YArVXPJYrPnvCCqNEs36CO7rIyJHzVj/ZafrSmK\r\nRiiOhTntcCvq4ugKTvBDiMgxzVQTHYu/4iRACrq4Lkaq9ZEtjljmorIJlgOv\r\n53S7fqax4dCHMVP9ACbF4I9uQHUO0T4CELUovN80/uUkXep/aKTddCGqYDbj\r\nsKVfyyLl0XMiAwoZ/unVu2HW2a5s20z3RS0dd4ADBAnstBx4Jxc3JV/e/3Dx\r\nHsTDPNhAIABB+G6uZvk5t2HNLonO+sXCovqkSoJAIjmzug4twuQj+GD3Hzfc\r\ntxWZQTojsAwgvkhBcHVHIM49epdnjaZt1fHmpAlRzMpSA7fMFy6aDooeXOA4\r\nAvETWILzcBqZtI5PRnROgGvObQ71ww6t2ijWJqbA8bFsY50OYPa9Oc+uw549\r\nFwMhiedyOT7YqA1V7nSAt1gtEjaAP0cUKseVb3eQcJdnoe7jXkql/X6eD/A2\r\ncdqFLR6O3NDD4OJOCwhzHzLTO8jym430jfxRSilUAsyJl4MAuXluUeVScl03\r\nkqjDXowWCYObSkj2E8bSD2AW1lHsFEoxHyU=\r\n=Rkwe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"blueislandx","email":"BlueIslandX@protonmail.com"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/island-taobao-bypass_1.1.2_1677642945787_0.7808466482594918"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-22T05:48:25.657Z","1.1.0":"2023-02-22T05:48:25.983Z","modified":"2023-03-01T03:55:46.033Z","1.1.1":"2023-02-25T10:03:51.377Z","1.1.2":"2023-03-01T03:55:45.923Z"},"maintainers":[{"name":"blueislandx","email":"BlueIslandX@protonmail.com"}],"description":"Island (小蓝岛) 淘宝商品数字 id 转联盟字符 id 解决方案 (开源版)","homepage":"https://github.com/Blue-Island-X/Island-Taobao-Bypass#readme","keywords":["taobao","taobaoke","alimama"],"repository":{"type":"git","url":"git+https://github.com/Blue-Island-X/Island-Taobao-Bypass.git"},"author":{"name":"开封小蓝岛科技有限公司"},"bugs":{"url":"https://github.com/Blue-Island-X/Island-Taobao-Bypass/issues"},"license":"MIT","readme":"<h1 align=\"center\">\r\n    <b>\r\n        <a href=\"https://github.com/Blue-Island-X\"><img style=\"width:128px;\" src=\"https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/logo.png\" /></a><br>\r\n    </b>\r\n</h1>\r\n\r\n<p align=\"center\">小蓝岛淘宝商品数字 id 转联盟字符 id 解决方案</p>\r\n\r\n<div align=\"center\">\r\n\r\n[![npm version](https://img.shields.io/npm/v/@blueislandx/island-taobao-bypass.svg?style=flat-square)](https://www.npmjs.org/package/@blueislandx/island-taobao-bypass)\r\n[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=@blueislandx/island-taobao-bypass&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=@blueislandx/island-taobao-bypass)\r\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@blueislandx/island-taobao-bypass?style=flat-square)](https://bundlephobia.com/package/@blueislandx/island-taobao-bypass@latest)\r\n[![npm downloads](https://img.shields.io/npm/dm/@blueislandx/island-taobao-bypass.svg?style=flat-square)](https://npm-stat.com/charts.html?package=@blueislandx/island-taobao-bypass)\r\n[![Known Vulnerabilities](https://snyk.io/test/npm/@blueislandx/island-taobao-bypass/badge.svg?style=flat-square)](https://snyk.io/test/npm/@blueislandx/island-taobao-bypass)\r\n\r\n</div>\r\n\r\n## 1.前情提要\r\n\r\n淘宝联盟必须使用新版的联盟字符 id 进行传参来获取商品信息，但是淘宝联盟官方不肯开放转换接口权限给不是比价场景的应用  \r\n\r\n![淘宝联盟官方私聊回复](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_oFr6NmYFGf.png)\r\n\r\n每天钉钉群里都有大量淘客反馈该问题，大家都表示看不懂文档了\r\n\r\n![淘宝联盟钉钉群消息](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_m18wT28Apm.png)\r\n\r\n群里每天都有人加群去问这个问题，可淘宝联盟官方却一直重复一个回答\r\n\r\n![淘宝联盟官方群回复](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_IJUUALakAc.png)\r\n\r\n大家集思广益想出了申请比价工具商就可以进行转换了，结果淘宝官方出了[场景ID权限预警](https://qn.taobao.com/headline/news/10695294?spm=a211vu.12026430.0.0.1fff3929wEYil2)进行反制\r\n\r\n![淘宝联盟场景权限预警](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_jFVoegeB6w.png)\r\n\r\n我还是最喜欢这位老哥的话，属实说了我不敢说的\r\n\r\n![淘宝联盟牛逼老哥](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_urNiroEBPT.png)\r\n\r\n~~所以说群友们的攻击性有待提高，素质有待降低~~\r\n\r\n## 2.实现原理\r\n\r\n一位群友在群里发了一张图片, 通过直接搜索链接可以返回商品信息但是不会返回商品 id 和链接\r\n\r\n![淘宝联盟官方群友方法](https://raw.githubusercontent.com/Blue-Island-X/Island-Taobao-Bypass/main/resource/DingTalk_YgbzJ7xGTW.png)\r\n\r\n我们可以通过标题 ``title`` 进行搜索，再根据卖家标识符 ``seller_id`` 再加上大图链接 ``pict_url`` 或者白底图链接 ``white_image`` 做一个匹配\r\n\r\n> P.S: 精确标题无法使用，淘宝联盟会不返回商品 id 等信息\r\n\r\n## 3.如何安装\r\n\r\n```\r\nnpm i @blueislandx/island-taobao-bypass --save\r\n```\r\n\r\n> P.S: 本项目依赖于 [Island-Union-SDK](https://github.com/Blue-Island-X/Island-Union-SDK)\r\n\r\n## 4.如何使用\r\n\r\n```TypeScript\r\nimport union from '@blueislandx/island-union-sdk';\r\nimport taobao from '@blueislandx/island-taobao-bypass';\r\n\r\nconst client = new union.taobao.Client({\r\n    appKey: '<你的 AppKey>',\r\n    secretKey: '<你的 SecretKey>'\r\n});\r\nconst hack = new taobao.union.Hack(client, <最大搜索限制 (默认 10 次 * 100 条)>);\r\n\r\nconst result = await hack.getGoodsById('<商品数字 id>', '<你的广告位 id>', <是否是天猫商品 (默认为否)>, <是否开启精确模式 (默认为是)>);\r\n```\r\n\r\n> P.S: 在精确模式中, 会请求商品信息两次 (避免低概率的白底图或者主图更换导致匹配不到商品的问题)\r\n\r\n## 5.注意事项\r\n\r\n在 1.0.1 以及之后版本中, **整个商品**的信息都会被返回, 不再单独返回商品 id  \r\n\r\n数据结构可以参考该链接: https://open.taobao.com/api.htm?docId=35896&docType=2","readmeFilename":"README.md"}