File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1616import os
1717import asyncio
1818
19+ from urllib .parse import quote
20+
1921from wechaty import (
2022 Contact ,
2123 FileBox ,
@@ -49,7 +51,7 @@ async def on_scan(
4951 Scan Handler for the Bot
5052 """
5153 print ('Status: ' + str (status ))
52- print ('View QR Code Online: https://wechaty.js.org/qrcode/' + qrcode )
54+ print ('View QR Code Online: https://wechaty.js.org/qrcode/' + quote ( qrcode ) )
5355
5456
5557async def on_login (user : Contact ):
@@ -68,6 +70,15 @@ async def main():
6870 # Make sure we have set WECHATY_PUPPET_SERVICE_TOKEN in the environment variables.
6971 # Learn more about services (and TOKEN) from https://wechaty.js.org/docs/puppet-services/
7072 #
73+ # It is highly recommanded to use token like [paimon] and [wxwork].
74+ # Those types of puppet_service are supported natively.
75+ # https://wechaty.js.org/docs/puppet-services/paimon
76+ # https://wechaty.js.org/docs/puppet-services/wxwork
77+ #
78+ # Replace your token here and umcommt that line, you can just run this python file successfully!
79+ # os.environ['token'] = 'puppet_paimon_your_token'
80+ # os.environ['token'] = 'puppet_wxwork_your_token'
81+ #
7182 if 'WECHATY_PUPPET_SERVICE_TOKEN' not in os .environ :
7283 print ('''
7384 Error: WECHATY_PUPPET_SERVICE_TOKEN is not found in the environment variables
You can’t perform that action at this time.
0 commit comments