LocationMessage
位置消息,继承自 Message。
属性
| 属性 | 类型 | 说明 |
|---|---|---|
content | str | 位置描述 |
sender | str | 发送者 |
source | Source | 消息来源 |
address | str | 详细地址 |
type_label | str | 固定为 "位置消息" |
支持的操作
view、hover、scroll_to_visible、refresh、quote、collect、forward、revoke、delete
示例
python
from pywxauto import Weixin, Event
wx = Weixin()
@wx.on(Event.LOCATION)
def on_location(weixin, chat, message):
print(f"{message.sender} 分享了位置: {message.address}")