zoukankan      html  css  js  c++  java
  • python小记

    最近有匹骚猪用微信骚扰我,我很是气愤,

    自学一波脚本:

    学习目的:用脚本回击回去,通过py写一个脚本,一次性给别人发n条消息;

      mac上自学python;

    brew install python3(自动安装pip3)

    可以通过命令查看  brew info python3

    安装库

    pip3 install -U wxpy

    一切准备就绪,下面写个脚本:

    vi a.py

    #!/usr/bin/python
    #coding=utf-8
    
    from wxpy import *
    
    bot = Bot()
    
    tuling = Tuling(api_key='8c02ae3f727a48669c52ca6ed5db2c48')
    
    @bot.register()
    def print_others(msg):
     print(msg)
    
    
    my_friend = bot.friends().search(u'陈泽勇', sex=MALE,)[0]
    #group = bot.groups().search(u'debug')[0]
    
    #@bot.register(group)
    #def reply_gua_pi(msg):
    # print(msg)
    # print(tuling.do_reply(msg))
    
    
    for i in range(0,100):
     my_friend.send(u'啪啪啪')
    
    
    
    #for member in group:
    # print(member)
    #print(group)
    #print(my_friend)
    embed()

    输入命令运行即可: 

    python3 a.py

    over。。。

  • 相关阅读:
    vue 添加对象的新属性的方法
    vue 简单的c3属性写法
    大数据分析技术生态圈一览
    网络
    Axis2 WebService客户端Axis2调用
    前端资源
    不错的数据库
    dubbo
    大数据相关
    This is very likely to create a memory leak 异常
  • 原文地址:https://www.cnblogs.com/chenzeyong/p/7111171.html
Copyright © 2011-2022 走看看