wxpy 除了用于自动回复外,在搜索方面也很拿手。
是指在自己的好友或已加入的群聊中进行搜索
这里举个针对群的例子~
package crypto | |
import ( | |
"crypto/sha256" | |
) | |
// NewSHA256 ... | |
func NewSHA256(data []byte) []byte { | |
hash := sha256.Sum256(data) | |
return hash[:] |
----- BEGIN LICENSE ----- | |
eldon | |
Single User License | |
EA7E-1122628 | |
C0360740 20724B8A 30420C09 6D7E046F | |
3F5D5FBB 17EF95DA 2BA7BB27 CCB14947 | |
27A316BE 8BCF4BC0 252FB8FF FD97DF71 | |
B11A1DA9 F7119CA0 31984BB9 7D71700C | |
2C728BF8 B952E5F5 B941FF64 6D7979DA | |
B8EB32F8 8D415F8E F16FE657 A35381CC |
mixin ga(id) | |
//- Pass your ga id, as an attribute, eg. +ga('yourid12345') | |
script. | |
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= | |
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; | |
e=o.createElement(i);r=o.getElementsByTagName(i)[0]; | |
e.src='https://www.google-analytics.com/analytics.js'; | |
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); | |
ga('create', !{id});ga('send','pageview'); |
package main | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
"math/big" | |
) |
package main | |
import ( | |
"encoding/base64" | |
"fmt" | |
rand "math/rand" | |
"time" | |
"github.com/gin-gonic/gin" |
from wxpy import * | |
bot = Bot() | |
tuling = Tuling('你的 API KEY (http://www.tuling123.com/)') | |
my_friend = ensure_one(bot.friends().search('好友的名称')) | |
@bot.register(my_friend, TEXT) | |
def tuling_reply(msg): |
{ | |
"xiaohongshu.com": "小红书", | |
"vip.com": "唯品会", | |
"douguo.com": "豆果美食", | |
"youshu.cc": "有书", | |
"missfresh.cn": "每日优鲜", | |
"qnr.io": "去哪儿", | |
"kaola.com": "网易考拉", | |
"waimai.meituan.com": "美团外卖", | |
"qcs.meituan.com": "美团打车", |
import axios from 'axios'; | |
export default (Vue) => { | |
Object.defineProperties(Vue.prototype, { | |
$http: { | |
get() { | |
return axios; | |
} | |
} | |
}); |
package main | |
import ( | |
"github.com/jinzhu/gorm" | |
_ "database/sql" | |
_ "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql" | |
) | |
// You can read more in this post: http://forecastcloudy.net/2016/06/28/using-google-cloud-sql-from-go-with-gorm-in-google-container-engine-and-google-compute-engine/ | |
func main() { |