资源简介
bilibili源码,需要的大佬可以自己自行下载,现在好多地方的不完整,这个是完整的
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2017-12-25 下午2:43
# @Author : Hedan (hedan@bilibili.com)
# @file : databusTest
import json
import redis
# [databus]
# key = “4ba46ba31f9a44ef“
# secret = “99985eb4451cfb1b899ca0fbe3c4bdc8“
# group = “AccountLog-MainAccount-P“
# topic = “AccountLog-T“
# action = “pub“
# name = “member-service/databus“
# proto = “tcp“
# addr = “172.16.33.158:6205“
# idle = 100
# active = 100
# dialTimeout = “1s“
# readTimeout = “60s“
# writeTimeout = “1s“
# idleTimeout = “10s“
“““参考文档 http://info.bilibili.co/pages/viewpage.action?pageId=3670491
key 服务配置中databus的key
value 服务配置中databus的value
host和port 配置服务中databus的host和port
group-topic 一个group对应一个topic(开发申请)
“““
#每日登录 passport 获得5经验值
# data_passport ={
# ‘mid‘:4780461
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@PassportLog-MainAccount-P/topic=PassportLog-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日登录 account 获得5经验值
# data_passport ={
# ‘mid‘:110000092
# ‘loginip‘:1726481463
# “timestamp“:1516517576
# }
# auth_passport = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountLoginAward-MainAccount-P/topic=AccountLoginAward-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_passport)
# msg = json.dumps(data_passport ensure_ascii=False)
# rc.set(“1023“ msg)
# 每日首次分享视频 archive 获得5经验值
# data_archive ={
# ‘event‘:“share“
# ‘mid‘:110000092
# ‘ip‘:“127.0.0.1“
# “ts“:111
# }
# auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
# rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
# print rc.execute_command(‘auth‘auth_archive)
# msg = json.dumps(data_archive ensure_ascii=False)
# rc.set(“1023“ msg)
#
#
# 每日首次分享视频 archive 获得5经验值
data_archive ={
‘event‘:“view“
# ‘mid‘:110000092
‘mid‘:4780461
‘ip‘:“127.0.0.1“
“ts“:1521745000
}
auth_archive = ‘4ba46ba31f9a44ef:99985eb4451cfb1b899ca0fbe3c4bdc8@AccountExp-MainAccount-P/topic=AccountExp-T&role=pub&offset=new‘
rc = redis.Redis(host=‘172.16.33.158‘ port=6205 socket_keepalive=True)
print rc.execute_command(‘auth‘auth_archive)
msg = json.dumps(data_archive ensure_ascii=False)
rc.set(“1023“ msg)
# 每日首次观看 history 获得5经验值
# data_history ={
# “action“:“insert“
# “table“:“aso_account“
# “data“:{“mid“:110000193
# “userid“:“test_dan06“
# “uname“:“test_dan08“
# “pwd“:“6cfbf96b8f0eb2e0a82b46a4236e8883“
# “salt“:“D8fd30Kj“
# “email“:“169d9106a74d5e95de71be6cf373af04“
#
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-22 02:59 openbilibili-go-common-master\
文件 1276 2019-04-22 02:59 openbilibili-go-common-master\.bazelrc
文件 894 2019-04-22 02:59 openbilibili-go-common-master\.generated_files
文件 398 2019-04-22 02:59 openbilibili-go-common-master\.gitignore
文件 976 2019-04-22 02:59 openbilibili-go-common-master\.gitlab-ci.yml
目录 0 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\
目录 0 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\
文件 467 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\Bug.md
文件 341 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\Doc.md
文件 301 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\Feature.md
文件 299 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\Refactor.md
文件 377 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\issue_templates\Suggestion.md
目录 0 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\merge_request_templates\
文件 365 2019-04-22 02:59 openbilibili-go-common-master\.gitlab\merge_request_templates\Common.md
文件 284 2019-04-22 02:59 openbilibili-go-common-master\.gome
文件 25 2019-04-22 02:59 openbilibili-go-common-master\.kazelcfg.json
目录 0 2019-04-22 02:59 openbilibili-go-common-master\.rider\
文件 265 2019-04-22 02:59 openbilibili-go-common-master\.rider\.gome
文件 2109 2019-04-22 02:59 openbilibili-go-common-master\.rider\CHANGELOG.md
文件 195 2019-04-22 02:59 openbilibili-go-common-master\.rider\CONTRIBUTORS.md
文件 285 2019-04-22 02:59 openbilibili-go-common-master\.rider\OWNERS
文件 1055 2019-04-22 02:59 openbilibili-go-common-master\.rider\bazel_build.sh
文件 980 2019-04-22 02:59 openbilibili-go-common-master\.rider\changefiles.sh
文件 465 2019-04-22 02:59 openbilibili-go-common-master\.rider\changepkgs.sh
文件 709 2019-04-22 02:59 openbilibili-go-common-master\.rider\lint.sh
文件 472 2019-04-22 02:59 openbilibili-go-common-master\.rider\make_update.sh
文件 689 2019-04-22 02:59 openbilibili-go-common-master\.rider\sagacheck.sh
文件 10099 2019-04-22 02:59 openbilibili-go-common-master\.rider\unit_test.sh
文件 21 2019-04-22 02:59 openbilibili-go-common-master\BUILD.bazel
文件 10535 2019-04-22 02:59 openbilibili-go-common-master\CHANGELOG.md
文件 57 2019-04-22 02:59 openbilibili-go-common-master\CONTRIBUTORS.md
............此处省略30627个文件信息
评论
共有 条评论