如何使用yowsup发送简单消息

时间:2017-03-11 22:16:50

标签: python yowsup

我正在尝试使用yowsup向whatsapp号码发送消息。

我可以申请短信和密码。

但是当我跑步时:

yowsup-cli demos -d -c config_test -s“number”“消息测试”-d

我收到此消息并且未收到消息:

yowsup-cli  v2.0.15
yowsup      v2.5.0

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


DEBUG:yowsup.env.env:Env not set, setting it to android
DEBUG:yowsup.env.env:Current env changed to android 
DEBUG:yowsup.stacks.yowstack:Initializing stack
DEBUG:yowsup.stacks.yowstack:Constructed Network Layer
DEBUG:yowsup.stacks.yowstack:Constructed Stanza Regulator Layer
DEBUG:yowsup.stacks.yowstack:Constructed Crypt Layer
DEBUG:yowsup.stacks.yowstack:Constructed Coder Layer
DEBUG:yowsup.stacks.yowstack:Constructed Logger Layer
DEBUG:yowsup.stacks.yowstack:Constructed <yowsup.layers.axolotl.layer_control.AxolotlControlLayer object at 0x10610d410>
DEBUG:yowsup.stacks.yowstack:Constructed Axolotl Layer - <yowsup.layers.axolotl.layer_receive.AxolotlReceivelayer object at 0x106105c90>
DEBUG:yowsup.stacks.yowstack:Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Presence Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Groups Iq Layer - Media Layer - Privacy Layer - Profiles Layer
DEBUG:yowsup.stacks.yowstack:Constructed Interface Layer
DEBUG:yowsup.layers.network.layer:Connecting to e14.whatsapp.net:443
DEBUG:yowsup.layers.logger.layer:tx:
<stream:features>
</stream:features>

DEBUG:yowsup.layers.logger.layer:tx:
<auth passive="true" user="xxxxxx" mechanism="WAUTH-2">
</auth>

DEBUG:yowsup.layers.logger.layer:rx:
<stream:features>
</stream:features>

DEBUG:yowsup.layers.logger.layer:rx:
<challenge>
i????????
         5?St
HEX:69ed861f809a171988c1dbc9e50b35bb531c0e74
</challenge>

DEBUG:yowsup.layers.logger.layer:tx:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
L5?wwn?ǔ?t?????cZ??}҇o?h?Z?@#???zj?.??????}[=??8?k?r0??
                                                      ?
$K??d??}
HEX:134c351c8877776ea0c794e374f996f7bebd635a00cdf07d02d2876ff0b768bc5afd4023fdbed57a6a942eb899888103f2f77d1a5b3d16fde138b66b9a157230fd018f0b850a244bedebb664c7f67d
</response>

DEBUG:yowsup.layers.network.layer:Disconnected, reason: Connection Closed

1 个答案:

答案 0 :(得分:2)

我想尝试这个命令,希望它也适合你

yowsup-cli demos -c config_test -s "number" "Message test"

另外不要将-d用于调试日志