npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blueislandx/island-taobao-bypass

v1.1.2

Published

Island (小蓝岛) 淘宝商品数字 id 转联盟字符 id 解决方案 (开源版)

Downloads

48

Readme

npm version install size npm bundle size npm downloads Known Vulnerabilities

1.前情提要

淘宝联盟必须使用新版的联盟字符 id 进行传参来获取商品信息,但是淘宝联盟官方不肯开放转换接口权限给不是比价场景的应用

淘宝联盟官方私聊回复

每天钉钉群里都有大量淘客反馈该问题,大家都表示看不懂文档了

淘宝联盟钉钉群消息

群里每天都有人加群去问这个问题,可淘宝联盟官方却一直重复一个回答

淘宝联盟官方群回复

大家集思广益想出了申请比价工具商就可以进行转换了,结果淘宝官方出了场景ID权限预警进行反制

淘宝联盟场景权限预警

我还是最喜欢这位老哥的话,属实说了我不敢说的

淘宝联盟牛逼老哥

~~所以说群友们的攻击性有待提高,素质有待降低~~

2.实现原理

一位群友在群里发了一张图片, 通过直接搜索链接可以返回商品信息但是不会返回商品 id 和链接

淘宝联盟官方群友方法

我们可以通过标题 title 进行搜索,再根据卖家标识符 seller_id 再加上大图链接 pict_url 或者白底图链接 white_image 做一个匹配

P.S: 精确标题无法使用,淘宝联盟会不返回商品 id 等信息

3.如何安装

npm i @blueislandx/island-taobao-bypass --save

P.S: 本项目依赖于 Island-Union-SDK

4.如何使用

import union from '@blueislandx/island-union-sdk';
import taobao from '@blueislandx/island-taobao-bypass';

const client = new union.taobao.Client({
    appKey: '<你的 AppKey>',
    secretKey: '<你的 SecretKey>'
});
const hack = new taobao.union.Hack(client, <最大搜索限制 (默认 10 次 * 100 条)>);

const result = await hack.getGoodsById('<商品数字 id>', '<你的广告位 id>', <是否是天猫商品 (默认为否)>, <是否开启精确模式 (默认为是)>);

P.S: 在精确模式中, 会请求商品信息两次 (避免低概率的白底图或者主图更换导致匹配不到商品的问题)

5.注意事项

在 1.0.1 以及之后版本中, 整个商品的信息都会被返回, 不再单独返回商品 id

数据结构可以参考该链接: https://open.taobao.com/api.htm?docId=35896&docType=2