I just want to roll out the wool, but I am too lazy to look for them one by one and send them out one by one. It is known that there are many rebate apps currently, such as: Haosheng, Miyuan, Pink Elephant Life, High Commission Alliance, Fenxiang, Peanut Diary, Hui Whale and so on. In the final analysis, it is nothing more than using the open platforms of Taobao, JD.com, Pinduoduo, and Suning. So I thought about whether I could use the existing open platform to create my own wool-raising project.
In fact, to put it bluntly:
The project mainly refers to EverydayWechat
Create a scheduled task, obtain the preferential information of Taobao promoters through the API, and send it to the group chat.
Create a scheduled task, obtain the JD Alliance's preferential information through the API, and send it to the group chat.
Create a scheduled task, obtain the preferential information of Duoduo Jinbao (Duobaoke) through the API, and send it to the group chat.
Create a scheduled task, obtain the preferential information of Suning Alliance (Suning Tike) through the official SDK, and send it to the group chat.
Create a scheduled task, obtain Vipshop's discount information through the official SDK, and send it to the group chat.
Please use pip install itchat-uos==1.5.0.dev0
After installation, the web version is available.
Only the promoter settings are introduced. For the rest of the configuration, please refer to EverydayWechat without unnecessary elaboration.
Parameter description:
Taobao Alliance
name | Example | Required | illustrate |
---|---|---|---|
is_open | True/False | Required | Whether to enable Taobao alliance promotion |
app_key | Taobao Alliance app_key | Required | App_key applied for by Taobao Alliance |
app_secret | Taobao Alliance app_secret | Required | app_secret applied for by Taobao Alliance |
adzone_id | Taobao alliance advertising space | Required | Advertising space in Taobao affiliate promotion |
chat_groups | Required | See examples for details | |
group_name | Group name | Required | The group name corresponding to the WeChat group |
group_material_id | Material id | Required | Taobao Alliance material_id |
minute | minute | Required | Minutes corresponding to scheduled tasks, separated by commas, pay attention to spaces |
hour | Hour | Required | Hours corresponding to scheduled tasks, separated by commas, pay attention to spaces |
JD Alliance
name | Example | Required | illustrate |
---|---|---|---|
is_open | True/False | Required | Whether to enable JD alliance promotion |
app_key | JD Alliance app_key | Required | app_key applied for by JD Alliance |
app_secret | JD Alliance app_secret | Required | app_secret applied by JD Alliance |
site_id | Jingdong alliance website id or app id | Required | JD.com website id or app id |
chat_groups | Required | See examples for details | |
group_name | Group name | Required | The group name corresponding to the WeChat group |
group_material_id | Material id | Required | Jingdong alliance material id |
minute | minute | Required | Minutes corresponding to scheduled tasks, separated by commas, pay attention to spaces |
hour | Hour | Required | Hours corresponding to scheduled tasks, separated by commas, pay attention to spaces |
Pinduoduo (Duoduo Jinbao, Duoduoke)
name | Example | Required | illustrate |
---|---|---|---|
is_open | True/False | Required | Whether to enable Pinduoduo promotion |
app_key | Pinduoduo Client_id | Required | Client_id applied for by Pinduoduo |
app_secret | Pinduoduo Client_secret | Required | Client_secret applied for by Pinduoduo |
site_id | Promotional position | Required | Promotional bit pid obtained using Pinduoduo interface |
chat_groups | Required | See examples for details | |
group_name | Group name | Required | The group name corresponding to the WeChat group |
group_material_id | Column | Optional | Reserved fields, the bottom layer is useless |
minute | minute | Required | Minutes corresponding to scheduled tasks, separated by commas, pay attention to spaces |
hour | Hour | Required | Hours corresponding to scheduled tasks, separated by commas, pay attention to spaces |
Suning.com (Suning Tuike)
name | Example | Required | illustrate |
---|---|---|---|
is_open | True/False | Required | Whether to enable Suning promotion |
app_key | Suning.com appKey | Required | AppKey for new applications on Suning.com open platform |
app_secret | Suning.com secretKey | Required | secretKey of new application on Suning.com open platform |
ad_book_id | Promotional position | Required | Utilize the promotion position obtained by Suning Alliance |
chat_groups | Required | See examples for details | |
group_name | Group name | Required | The group name corresponding to the WeChat group |
group_material_id | Column | Optional | Reserved fields, the bottom layer is useless |
minute | minute | Required | Minutes corresponding to scheduled tasks, separated by commas, pay attention to spaces |
hour | Hour | Required | Hours corresponding to scheduled tasks, separated by commas, pay attention to spaces |
"Instance 1 , from 7:00 to 23:00 every day, at the 10th and 40th minutes of every hour, send the Taobao material ID: 19810 to the group chat <Word of Mouth KFC Pizza Hut McDonald's Coupon>:
{group_name: 'KFC Pizza Hut McDonald's Coupon', group_material_id: '19810', minute: '10,40', hour: '7-23'}
Example 2 : At 7 o'clock, 12 o'clock, and the 30th minute of 15 o'clock every day, the coupons with Taobao material ID: 3767, 27448, 13367, 3788 are sent to the group chat <Taobao internal discount group-women's clothing category ①>:
{group_name: 'Taobao internal discount group-women's clothing category ①', group_material_id: '3767,27448,13367,3788', minute: '30', hour: '9,12,15'}
Tip: Before running the program, make sure the group name already exists and has been saved to the address book.
To use Taobao Alliance's API, you need three things: App Key
, App Secret
, and ad zone adzone_id
Application reference:
Apply for Taobao Alliance API: Application address document reference
Read the documentation and get App Key
and App Secret
, and use product promotion to get the adzone_id
To use the JD Alliance API, you need App Key
, App Secret
, site ID siteId
, and a suowo token
.
Application reference:
Apply for JD Alliance API: Application address document reference
To use the JD Alliance to obtain promotional coupons, you need a siteId (the site ID refers to the website ID and APPID in the promotion management of the alliance backend). This application requires website registration or an actual app. If you don't apply early.
In addition, since the JD Alliance’s interface for generating short addresses requires application, the application qualification requirements (reference) are currently beyond our capabilities, so suo.mi is used to convert the short address. The differences are as follows:
name | Short URL example | illustrate |
---|---|---|
Jingdong short address | http://u.jd.com/XXXX | API application threshold is high |
shorten my address | http://suo.mi/XXXX | Low threshold, free |
Regarding the short address: It is recommended to choose the short address service of WeChat or Tencent for conversion to avoid being screened. The other reason why it is useless is that there is no relevant token and the API on other networks has not encountered a suitable one.
The shortened URL changed the domain name to suowo.cn in July 2020. The original suo.mi is still available, so the author has no relevant code changes.
To apply for Suning.com's API, please refer directly to the following document. The document comes from the interface person of Suning Alliance:
Suning Alliance Open Platform API Access Operation Guide 2.7-20200526.pdf
To apply for Pinduoduo API interface, Client_id
, Client_secret
and promotion bit pid
are required.
Apply for Pinduoduo (Duoduoke) API:
First, go to Pinduoduo Open Platform to apply for an application application address and get Client_id
and Client_secret
. Then go to Duoduo Jinbao and bind Client_id
. Then you can call the interface interface document and use the interface to get the promotion bit pid
Pinduoduo interface is called only 5,000 times a day
Apply for Vipshop API:
You can only apply for an institutional account with Vipshop. Application for an institutional account requires a business license. If you don’t have a business license, go to Order Man to apply to call the API. This is the official recommendation of Vipshop.
If you have a business license, please check the document to continue applying for Vipshop Alliance API access process document v1.9.pdf
I complained about Vipshop. It was very difficult to apply and the review was extremely slow. It took nearly a month after I submitted the application to receive a reply. Finally, I added a WeChat message from an internal person in charge of Vipshop to find out.
The author does not have a business license, so... he does not plan to continue dealing with Vipshop.
It is reported that Vipshop will open the personal developer API in July 2021. If it is open, this project will actively add this function. Be informed.
Directly download this project or clone the project to your local computer.
Use pip to install dependencies:
pip3 install -r requirements.txt
# 或者是使用 pip
# pip install -r requirements.txt
run:
python main . py
After scanning the code, you can use it.
If you want to use docker startup (make sure the _config.yaml
file has been changed to specify)
First create the image (make sure to run it in the directory where the project is located) and execute
docker build -f Dockerfile -t youxiang:1.0.0 .
Start the container and run
docker run -it -d --name youxiang youxiang:1.0.0
Run the following script to obtain the QR code, and then log in with WeChat
docker logs -f --tail=1000 youxiang
If you don’t want to change _config.yaml
every time you enter the container, you can map the project directory to the local in step 2.
docker run -it -d -v $pwd :/youxiang --name youxiang youxiang:1.0.0
Taobao:
JD.com:
Pinduoduo:
Suning.com:
It is prohibited to use this tool for commercial purposes . If legal disputes arise, I have nothing to do with it.
This project has been completely migrated to the non-Web version ( python-wechaty
version). In the future, only bugs will be maintained and no new features will be added. Please be informed.
This project is inspired by the following projects or articles, and refers to some of the ideas. I would like to express my gratitude to these developers.
Please write [github] as a note, otherwise it will be different.