python小記

來源:互聯網
上載者:User

標籤:arc   div   pytho   nbsp   other   reg   install   bug      

最近有匹騷豬用騷擾我,我很是氣憤,

自學一波指令碼:

學習目的:用指令碼回擊回去,通過py寫一個指令碼,一次性給別人發n條訊息;

 

 

  mac上自學python;

brew install python3(自動安裝pip3)

可以通過命令查看  brew info python3

 

安裝庫

pip3 install -U wxpy

 

一切準備就緒,下面寫個指令碼:

vi a.py

#!/usr/bin/python#coding=utf-8from 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。。。

python小記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.