-
Notifications
You must be signed in to change notification settings - Fork 60
Wechaty for Non-Weixin Accounts #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aherman3
wants to merge
24
commits into
wechaty:main
Choose a base branch
from
aherman3:aherman3-blog-wechaty_for_non_weixin_account
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1cd4c74
Wechaty for Non-Weixin Accounts
aherman3 9d3fb4c
Wechaty for Non-Weixin Accounts - Updated
aherman3 06270ba
0.11.60
aherman3 23ccbf0
0.11.61
aherman3 629dcac
0.11.62
aherman3 555b421
0.11.63
aherman3 d8ce5f6
0.11.64
aherman3 c77ed0a
0.11.65
aherman3 4e5c8af
0.11.66
aherman3 ff0b20e
0.11.67
aherman3 2e802c8
0.11.68
aherman3 3328ddd
0.11.69
aherman3 b5e7069
clarification: Wechaty for non-mainland China Accounts
aherman3 c175f96
clarification: Wechaty for non-mainland China Accounts
aherman3 551d8d4
0.11.60
aherman3 acc6f12
clarification: Wechaty for non-mainland China Accounts
aherman3 ac19c92
0.11.70
aherman3 9e66ec2
Merge branch 'main' into aherman3-blog-wechaty_for_non_weixin_account
aherman3 05b6ca2
Merge branch 'main' into aherman3-blog-wechaty_for_non_weixin_account
aherman3 8ce69f4
Update package.json
aherman3 b4944f1
Update jekyll/_contributors/aherman3.md
aherman3 16720cf
Update jekyll/_posts/2024-01-17-wechaty-for-non-mainland-wechat-accou…
aherman3 aa66623
Update jekyll/_posts/2024-01-17-wechaty-for-non-mainland-wechat-accou…
aherman3 4485ead
Update jekyll/_posts/2024-01-17-wechaty-for-non-mainland-wechat-accou…
aherman3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Annie Hermann | ||
site: https://github.com/aherman3 | ||
avatar: /assets/contributors/aherman3/avatar.webp | ||
bio: Peking University international graduate student | ||
email: [email protected] | ||
--- | ||
|
||
I'm Annie and I'm an American graduate student in China! I enjoy any opportunity to combine tech with language study. | ||
|
||
- University of Notre Dame '22 studying CS + Chinese | ||
- Yenching Academy of Peking University '24 | ||
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Contact me | ||
|
||
- GitHub: <https://github.com/aherman3> | ||
- Email:<[email protected]> | ||
- 微信: aherman3 |
85 changes: 85 additions & 0 deletions
85
jekyll/_posts/2024-01-17-wechaty-for-non-mainland-wechat-accounts.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
title: "Wechaty for non-Weixin accounts" | ||
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
author: aherman3 | ||
categories: talk | ||
tags: puppet-wechat | ||
image: /assets/2024/01-wechaty-for-non-mainland-wechat-accounts/error-message.webp | ||
--- | ||
|
||
## Using Wechaty with a non-mainland China WeChat account | ||
|
||
When scanning to access Wechaty, some international users may find they are still unable to log in. This may be due to which version of WeChat your account is registered with. **If your account was created with a non-Chinese Mainland mobile number (numbers not beginning with +86), you are using the international version of WeChat, which has some differences in service.** You can check which type of user you are through WeChat → Settings → About → Terms of Service. | ||
|
||
The international version of WeChat does not allow WeChat Web login, so scanning the default service Wechaty login QR will return the message "Service unavailable for this account". | ||
|
||
If you are a non-mainland Chinese Wechat user, don't worry! There are still multiple puppets you can use to access Wechaty. With my non-mainland Chinese account, I was able to successfully access Wechaty with all methods. | ||
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## 1. Puppet XP | ||
|
||
[Wechaty Puppet XP](https://github.com/wechaty/puppet-xp) for Windows logs in through Windows Desktop Wechat, so it is usable for Wechat users. If you use a Mac, you can still use puppet-xp through Bootcamp to partition a Windows OS. | ||
|
||
- Requirements | ||
1. Windows OS | ||
2. Your system must have Node.js installed (version >= 12). | ||
3. Install and login to Windows Desktop WeChat (v3.9.2) | ||
|
||
```shell | ||
git clone https://github.com/wechaty/wechaty-puppet-xp.git | ||
cd wechaty-puppet-xp | ||
npm install | ||
npm start | ||
``` | ||
|
||
## 2. PadLocal | ||
|
||
[Wechaty Puppet PadLocal](https://wechaty.js.org/docs/puppet-services/padlocal) can workaround Wechat user limitations without requiring Windows. PadLocal can also be used without VM. | ||
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Requirements | ||
1. Your system must have Node.js installed (version >= 12). | ||
2. Your system must have Wechaty (version >= 0.40). | ||
|
||
```shell | ||
npm install wechaty-puppet-padlocal | ||
export WECHATY_PUPPET=wechaty-puppet-padlocal | ||
export WECHATY_PUPPET_PADLOCAL_TOKEN=__TOKEN__ ## free token for 7 days from pad-local.com | ||
npm start | ||
``` | ||
|
||
## 3. Whatsapp | ||
|
||
Whatsapp has no conflict with mainland v. non-mainland numbers. Change your Wechaty puppet to [Whatsapp Web protocol](https://wechaty.js.org/docs/puppet-providers/whatsapp/) and use Whatsapp to scan the QR. | ||
|
||
```shell | ||
npm install wechaty-puppet-whatsapp | ||
export WECHATY_PUPPET=wechaty-puppet-whatsapp | ||
npm start | ||
``` | ||
|
||
## 4. WorkPro | ||
|
||
[Wechaty WorkPro Puppet](https://wechaty.js.org/docs/puppet-services/workpro) provided by RPAChat is also available. It is recommended to us Github Codespace for installation. | ||
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
aherman3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Requirements | ||
1. Your system must have Node.js installed (version >= 16). | ||
2. Use latest version of Wechaty | ||
|
||
First set environment variables | ||
|
||
```shell | ||
export WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT=true | ||
``` | ||
|
||
Then revise examples/ding-dong-bot.ts by changing lines 73-76 to the following code | ||
|
||
```node | ||
puppet: 'wechaty-puppet-service', // NOTE: NOT 'wechaty-puppet-workpro' | ||
puppetOptions: { | ||
token: 'xxx', // your token (ex.'puppet_workpro_xxxxxx') | ||
} | ||
``` | ||
|
||
And launch | ||
|
||
```shell | ||
npm start | ||
``` |
Binary file added
BIN
+17.9 KB
jekyll/assets/2024/01-wechaty-for-non-mainland-wechat-accounts/error-message.webp
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.