Commit cba8d966 authored by 段英荣's avatar 段英荣

Merge branch 'sentry' into 'master'

Sentry

See merge request alpha/physical!414
parents f31fbaeb 1939c541
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (physical1)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (LiXiaoFang)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
......
......@@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.6 (physical1)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.6 (LiXiaoFang)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
......
......@@ -7,6 +7,16 @@ import traceback
import logging
from libs.es import ESPerform
from trans2es.type_info import get_type_info_map, TypeInfo
from vest.reply import true_comment_one, true_comment_two, true_comment_three,one_seven_topic_comment
from vest.click import true_click_five, true_click_two, true_click_four, true_click_one, true_click_three, \
one_seven_star_topic
from vest.follow import auto_follow, auto_follow_new
from vest.urge import auto_star_urge, auto_lunch_app, auto_lunch_app2, auto_urge1, auto_urge2
from vest.fix import fix_no_comment_click
from vest.reply_answer import reply_comment2, reply_comment3, answer_reply2, answer_reply3, answer_reply1
from vest.request import get_session, auto_user_id
from vest.vest_majiauser import vest_click_reply
from vest.pictorial import principal_offline_comment1, principal_online_comment1
class Command(BaseCommand):
......@@ -27,10 +37,14 @@ class Command(BaseCommand):
make_option('-s', '--pks', dest='pks', help='specify sync pks, comma separated', metavar='PKS', default=''),
make_option('--streaming-slicing', dest='streaming_slicing', action='store_true', default=True),
make_option('--no-streaming-slicing', dest='streaming_slicing', action='store_false', default=True),
make_option('-m', '--mvest', dest='mvest', help='mvest reply comment', metavar='MVEST'),
)
def handle(self, *args, **options):
try:
logging.info("get-------------")
es_cli = ESPerform.get_cli()
type_name_list = get_type_info_map().keys()
......@@ -47,7 +61,6 @@ class Command(BaseCommand):
logging.info("begin create [%s] mapping!" % type_name)
ESPerform.put_index_mapping(es_cli, type_name, force_sync=True)
if len(options["indices_template"]):
template_file_name = options["indices_template"]
if ESPerform.put_indices_template(es_cli=es_cli, template_file_name=template_file_name,
......@@ -55,5 +68,81 @@ class Command(BaseCommand):
logging.info("put indices template suc!")
else:
logging.error("put indices template err!")
# 点赞
if options["mvest"] == "true_click_one":
true_click_one.true_click_one()
if options["mvest"] == "true_click_two":
true_click_two.true_click_two()
if options["mvest"] == "true_click_three":
true_click_three.true_click_three()
if options["mvest"] == "true_click_four":
true_click_four.true_click_four()
if options["mvest"] == "true_click_five":
true_click_five.true_click_five()
if options["mvest"] == "one_seven_star_topic":
one_seven_star_topic.one_seven_star_topic()
# 评论
if options["mvest"] == "true_comment_one":
true_comment_one.true_comment_one()
if options["mvest"] == "true_comment_two":
true_comment_two.true_comment_two()
if options["mvest"] == "true_comment_three":
true_comment_three.true_comment_three()
if options["mvest"] == "one_seven_topic_comment":
one_seven_topic_comment.one_seven_topic_comment()
# 催更
if options["mvest"] == "auto_urge1":
auto_urge1.auto_urge1()
if options["mvest"] == "auto_urge2":
auto_urge2.auto_urge2()
if options["mvest"] == "auto_lunch_app":
auto_lunch_app.auto_lunch_app()
if options["mvest"] == "auto_lunch_app2":
auto_lunch_app2.auto_lunch_app2()
if options["mvest"] == "auto_star_urge":
auto_star_urge.auto_star_urge()
# 关注
if options["mvest"] == "auto_follow":
auto_follow.auto_follow()
if options["mvest"] == "auto_follow_new":
auto_follow_new.auto_follow_new()
# 补足
if options["mvest"] == "fix_no_comment_click":
fix_no_comment_click.fix_no_comment_click()
# 二级评论
if options["mvest"] == "answer_reply1":
answer_reply1.answer_reply1()
if options["mvest"] == "answer_reply2":
answer_reply2.answer_reply2()
if options["mvest"] == "answer_reply3":
answer_reply3.answer_reply3()
if options["mvest"] == "reply_comment2":
reply_comment2.reply_comment2()
if options["mvest"] == "reply_comment3":
reply_comment3.reply_comment3()
# 获得session和use_id
if options["mvest"] == "get_login_session":
get_session.get_session()
if options["mvest"] == "get_user_id":
auto_user_id.auto_user_id()
# 马甲3456
if options["mvest"] == "vest_click_reply":
vest_click_reply.vest_click_reply()
# 榜单评论
if options["mvest"] == "principal_offline_comment1":
principal_offline_comment1.principal_offline_comment1()
if options["mvest"] == "principal_online_comment1":
principal_online_comment1.principal_online_comment1()
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
import time
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_convs
from vest.request.auto_request import host, user, db, passwd
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT distinct(user_id),id FROM topic WHERE is_online=1 and content_level in (4,5,6) and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
def one_seven_star_topic():
try:
numtime, numtime2 = time_convs(7, 1)
user_id = get_data(numtime, numtime2)
logging.info("get user_id:%s" % user_id)
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_conv
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
logging.info("get numtime:%s" % numtime)
logging.info("get numtime2:%s" % numtime2)
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_click_five():
try:
logging.info("click five")
numtime, numtime2 = time_conv(51, 41)
user_id = get_data(numtime, numtime2)
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_conv
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
logging.info("get numtime:%s" % numtime)
logging.info("get numtime2:%s" % numtime2)
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_click_four():
try:
logging.info("click four")
numtime, numtime2 = time_conv(47, 37)
user_id = get_data(numtime, numtime2)
dicts = {}
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
from vest.request.auto_request import login, click, time_conv
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
logging.info("get numtime:%s" % numtime)
logging.info("get numtime2:%s" % numtime2)
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
logging.info("get user_id:%s" % user_id)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_click_one():
try:
numtime, numtime2 = time_conv(5, 0)
user_id = get_data(numtime, numtime2)
for i in user_id:
cook = login()
logging.info("get cook:%s" % cook)
if cook is not None:
click(cook, i[1])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_conv
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
logging.info("get numtime:%s" % numtime)
logging.info("get numtime2:%s" % numtime2)
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_click_three():
try:
logging.info("click three")
numtime, numtime2 = time_conv(45, 35)
user_id = get_data(numtime, numtime2)
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import time
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_conv
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
logging.info("get numtime:%s" % numtime)
logging.info("get numtime2:%s" % numtime2)
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_click_two():
try:
numtime, numtime2 = time_conv(27, 17)
user_id = get_data(numtime, numtime2)
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
This diff is collapsed.
This diff is collapsed.
整理这个榜单的人也太优秀了吧
这个榜单我爱了
这个榜单是干货啊干货
整理这个榜单的人也太棒了吧
这个榜单我完全心动
真的是非常厉害了
这个榜单是我的菜
宁这个榜单一定会火的
超级棒了!!!!!!
这个榜单完全是我的取向狙击
整理的好棒,加油~
给贴主加油!
这么棒的榜单我一定要站前排!
火前留个名吧
超爱看这个类型的
疯狂夸赞贴主
收藏成功
真心瑞思拜
我真的超爱这个类型的榜单
感谢干货
支持支持
这是什么神仙榜单啊
整理的真的很棒啦
这个榜单有点屌
干货最实用了
比起别的更喜欢干货
在这里面得到了一些启发哈哈哈哈哈
真爱干货
断头推荐这个榜单
刚看到,好可惜
已经收藏好~
偶买噶,这个也太棒了
干货真棒
断头安利这个榜单
看榜单太欢乐了
pick这个榜单
被吸粉了
我要立刻把这个榜单分享给朋友
有人在一起看么?
各种榜单里面有宝藏
看见干货就会收藏
我立马把这个榜单分享给小伙伴
求更新下一个榜单
马一下,等会一起看
看见的第一件事儿就是点赞
看到很多感兴趣的就很幸福了
绝对不能错过
选择题真的好难做
您更新的下一个榜单我也一定追
看到很多感兴趣的就很开心了
成功安利给小伙伴
激情留名
好了,我要追到底了
respect!
偷偷看很多遍
瑞思拜
敬佩敬佩~
看见的第一件事儿就是收藏
真的很了不起呢
真的很佩服哇
太佩服你了
赞赞赞
激情夸赞这个榜单
悄咪咪的看很多遍
不收藏还在等啥呢
这是我不断翻阅的榜单
看各种榜单是我的快乐源泉
我最爱榜单没错了
果断pick
看见你更新我就很喜欢
你更新我立马来看了
我莫得感情,只想点赞
前排留个名吧
我宣布这是我的最爱了
给你点个赞
希望总能看见你更新
我在这个榜单住下了
这个榜单治愈了我
消除疲惫感的一榜单
感谢这个榜单哦
咋这么厉害呢
我吹爆这个榜单
给你点一万个赞
这是我最爱的榜单无疑
这个榜单是我留下的理由
这个榜单太了不起了
这个榜单所有内容我都爱!
很喜欢这个榜单,看了好几遍
吹爆这个榜单
我宣布我住在这个榜单了
先马一下
翻看了好几遍
整理的很全啊
请保持这个速度继续更新
宁整理的是对的
这个有点nice
先马一下一会看
噢哟,有点厉害的
太优秀了
看见这个榜单我决定留在这个app
这个好棒呀!
这个榜单整理的厉害了~
这个榜单好酷哦!!!
果断收藏了
真的很棒了呢
这个真的很酷哦
这个很棒啊
这个有点厉害
这个很不错的样子
就喜欢这种看这种榜单
果断码了
很厉害的样子
这个很需要了
这是什么好登西
wow!so cool
哇哇哇,我要化身尖叫鸡了
前来打call
在线打call哇
默默地占个前排
火速前来围观
火速前来占坑
前排留名
火前留名
前排围观
前排占坑
默默的钱来围观
默默地占个坑
这又是什么好东西哦
这个好像很厉害的样子
这个好像还不错哦
这个好像很不错哦
这个有点点厉害
这个有些厉害哦
这个感觉很棒哎
这个真心不错哦
这个真心喜欢呢
这个真心可以
这个真的可以哎!
不错,支持一下
这个好哎
真棒呀,支持!
特意前来打call
这个必须收藏
这个必须支持
这个我爱了
哇,真的不错
可以哎,相当可以
很棒啊,支持!
为你点赞!
前排火速留名
前排火速占坑
前排火速围观
我又看到了什么好东西哦
真好呀,支持!
很不错哎,支持一下
很OK啊,支持!
很OK啊,必须支持
很棒啊,必须支持!!!!
很不错,必须支持
很好啊,必须支持
哇,相当可以哎
哇,非常OK呢
哇,真的棒
哇,很厉害哎
是我喜欢的没错了
是戳我点的了
是我欣赏的呢
是我的菜了~~~
看着就好棒的样子
看着就不错的样子
看着很不错的样子
怎么办 心动了呢
非常OK哇
是很棒的内容
是很不错的内容
这真的是超级棒的榜单啊
好用心的榜单啊
真心喜欢这个榜单啊
榜单看着很厉害的样子
这个榜单很不错啊
这个必须支持了
这个必须收藏哇
感觉很不错呢
感觉很OK啊
感觉很喜欢呢
哇塞,可以呀!
哇塞,我爱了
相当不错哎
真的很OK呢
前排前来打call
前排火速来打call
前排火速赶来支持
前排火速赶来给排面
前排表白这个榜单
必须夸夸这个榜单了
前排火速赶来夸赞这个榜单
前排占楼夸下这个榜单
前排占坑表白此榜
很不错哎,夸一波这个榜单
这波必须夸一下这个榜单
下一次不要让我们等得太久好吗?
反正你的每一期我都看着呢。
恭喜你成功的吸引了我的注意力
呦呵 最近更的挺勤啊
啊啊啊。。。快把你的库存全部交出来!!!
超喜欢这种风格!!!!好好看!!!!
查收查收查收 嘻嘻
我是么得感情的舔狗机器
啊啊啊啊啊啊啊,终于逮住你啦!!!!
这才多久我就赶不上前排了
妈呀这么靠前!
看了一眼,好懵,我是前排
卑微小粉在线关注
为了贡献一个粉丝数上来关注一下
我怎就觉得我要开始转粉了呢
希望以后我可以成为你粉丝中的一员哦!
哈哈哈哈在线等你
今天热情营业中啊
我也在线给你彩虹屁
我早就关注你了 只是少评论 我要变铁粉
闲来无事就来看看
看到这么优秀的你我好开心!
今天刚关注你
我是一个不经常给你评论点赞的安安静静的粉儿
完了完了沦陷了沦陷了
又营业啦!!!好棒
最近辛苦啦,一直支持你
好吧。。。入坑
这营业频率也太开心了吧
天哪,这个今日营业很奈斯啊
这么多人评论你都回了宝贝考虑一下回我吗
我想使劲夸你!
我来了我来了我带着一天好心情来了
最近的更博速度好喜欢啊!!
每天营业也太棒了!把之前的都补回来
粉丝速度给我冲啊!
看到更新开心的我老泪纵横
一直默默地关注你,现在真的藏不住了!
刚上想看看你就发更新了哈哈哈啊哈
请保持这个速度哦 迷晕我
说实话我是新来的
这种营业速度我真的喜欢!!!!
热评坐稳了送我上去啊
我来啦我来啦!前排让让! 
我又来晚了?哇啊……
为你沦陷了~
考不考虑翻个牌啥的
请保持这个营业速度,不要停
我错过了前排,为什么!
我的愿望是你能越来越好
啊啊啊啊啊第一次这么前不知道说什么好啊啊
最近营业速度真的很优秀了!!!冲鸭!!!
我的愿望是你能每天更新
这营业速度我可以
我现在都抢不到前排惹
不知为什么真的很喜欢你,尽管没有尽头
就酱子更新,不要停
我的喜欢溢于言表
哇 等到你来了
更新速度保持喔
更新频率太棒了
我还能抢到你的热评嘛?
你永远都会被人发现,你是我们珍贵的宝藏啊
老大你的粉丝涨的有点快
继续加油,我们一直支持你
我也想成为你的铁粉
我的妈呀涨粉速度吓人
每日必做:到这来支持你一下
你终于被更多人知道了
听说你最近被圈粉很严重啊
我疯了第一次这么早!!!
你知不知道每天看到你 就超级开心的
哼 看过了 要新鲜的!!
前排送来彩虹屁!
今天更新好勤快呀!!!我爱了
你也一定会闪闪发光呀
我们永远在你身边
你真的火了,但是你好就好
前排混个眼熟。
你的粉丝越来越多了 老粉在背后默默支持你
天哪你居然更新了!!!!
你一定也会越来越好啊!!!冲鸭!!
你火了这么多评论 我再也上不了你的热评了
一个迟来的留言!
保持这个营业速度
老粉表示不努力再也抢不到前排了
我不管!反正我是第一!
啊啊啊啊啊啊,福利来啦,太暖了
会一如既往的支持您
管他呢 先夸再说
我觉得我上不了热评
终于想到发福利了,都要哭了!
继续加油,期待你的好作品
我真的打卡好多天了,我是不是很听话!!!!!
啊啊啊啊啊啊啊先尖叫了再说!!!
他来了他来了他带着欠着一屁股的粉丝福利来了
愿你走过的每一条路都平坦,度过的每一天艳阳满天
我对你很满意,你会越来越好的
看来我需要特别关注你了
啊啊啊啊啊啊,太突然了~我以为是假的
\ No newline at end of file
This diff is collapsed.
想有同款
同求
超羡慕
时尚时尚最时尚
不盘不行
买买买!
我有,等等发给你
写的真的好棒呢
小手已经动起来了
想学都学不会
心情好才是真的好
我也是~
小心楼主飘起来了
买买买!
希望博主越来越好
我也关注啦
楼主,写了好几篇有用的内容呢
装进购物车吧
对大家都有帮助
还想看到更多,嘻嘻
心动不如行动
安排上了
必须整一个
我也超爱这个色系
可爱的要命
我也是
实不相瞒,我也是
没事,它还会回来的
我觉得看看就够了
看的有些心塞
你值得拥有
总能看到你
送你上去
WINK~ 
优秀
怎么啦?
一起冲
做梦都想变成这样的人
稳住
冲鸭!
比纯净水还纯
那你现在应该就挺满意的吧哈哈
换成小姐姐么哈哈哈
就这么简单吗
我们都会在的
也是我喜欢的
土掉渣的情话么?
捞你上去
我要给小姐姐大心心哈哈
那你想让小姐姐说啥
不许叫我的小姐姐宝贝
确实好看
我见过你!!
真是花式夸奖
根本不用忍
棒棒的
赞同
爱的不行
自恋的感觉吗
真的挺好看的
我也这么觉得
一直好看好不好
必须的
你自己数数
选我选我选我
词穷了都
还有我还有我!!
真会玩
差的可能是颜值
想学哈哈哈
不,钻石粉
我也喜欢
日常夸赞是么哈哈
就这个feel
送你上去
额滴个亲娘啊,这也太可爱了吧!同问这是哪个小仙女
哪个最喜欢
但是就是很喜欢是不是哈哈
酷!
滴!沙瓦迪卡
我也期待
我说好有用么
这么直接的吗
很喜欢小姐姐的内容
没道理的赞同你
支持支持
我们和小姐姐差的就是颜值
这条街最靓的
期待你的第二次
哈哈哈哈,催更+1
小姐姐要多发发帖子呀
小姐姐的帖子都超棒
认认真真的听着
也是我的小可爱
我也学习了
实不相瞒,我也喜欢
很有品位哦 要继续喜欢我的小姐姐
美坏了应该
喜欢这一类的分享
楼上就是彩虹屁本屁了
啧啧啧,甜度满分
我也想遇到小姐姐
我也可!!!
一直在+1
我不管,我也想了
毕竟是我爱的宝藏女孩
想想就行╭(╯^╰)╮
放进榜单!
来晚了,想插队
下次你一定会前排的
时光老了也不散
比心队形!
你是住在like吗,这都被你等到了!
是谁,跟我一样发现小可爱更新了!
才没有,她是大家的宝藏
看吼吼,plmm太棒了!
翻我!翻我!
淡定淡定,小姐姐的日常操作
同意
唉呀妈呀,贼稀罕
我也好喜欢这一类的诶
终于等到更新啦
同等ing
一起向前冲鸭
棒当然是天生的
什么小东西,人家是小可爱
醒醒,你刷到了,别怀疑自己
冯巩附体?
哪哪都有你,到处跟plmm恋爱!
比一点点还多一点点!
me too
木有感情的第一名
看见你我也很开心
双击666嘛
记好这是第几次迟到了
永远不会晚
前面的姐妹一起哭
我永远喜欢她.jpg
哈哈,我Gucci的时候,眼泪也Prada的掉
她肯定没忘记我萌♪(^∇^*)
首先,你得跟我一样优秀
辛亏没放弃
小姐姐文笔还是蛮好的
小粉丝+1
这不是来了嘛
来来来,给你让开了
小姐姐经常又在发呀
土味肉麻
你好夸张啊
我就看看不说话
咋分享
还能更直白么
你还可以更疯狂
酷!
真的假的
小姐姐经常发帖的呀
惊到了嘛?
小姐姐就是神仙本仙哈哈
下班快乐
me2
OMG 这是在公开告白么
666。。。
意外的点在于…?
小姐姐估计没戏,我勉强回复你一下吧
小桃心好可爱
土味情话?
一起做更好的自己
想我想到黑夜白天?
那我给你当前排
这是在找存在感么
凑热闹
这就有人告白了?
你还能更快么
同喜欢
➕1
试完了等你的帖子
来来来,我来回复你
你可以给小姐姐一个小红心
给小姐姐笔芯
想一同承包哈哈
棒呆
早早早
没有最棒,只有更棒
奖励你一个赞
充实每一天
我就看看小姐姐会不会给你翻牌
你真会说话
咦,小姐姐才不是你的宝贝
你也太会夸人了
小姐姐还有别的帖子也不错
借着你的楼上去哈哈
这个小姐姐之前的文章也超棒
我也很喜欢
你不想被赞到明年吗
肯定啊
等着你的分享
这个可以收藏么
小姐姐一般不回复
这个有难度么?
咋保存?
可以确定了,确实有这么好看的
你想得美
围观+1
占坑+1
借楼留名
挤挤
瓜子汽水小板凳要哇
带我一个
我也是
但是还是点进来了哈哈
是的!
我也在问我自己这个问题
贵么
有钱有钱
这么速度
这个能找到嘛?
拿起我的小本本
喜欢
棒棒哒
哈哈哈哈,真有意思
我觉得也适合我
羡慕,我也想找个适合我的
真好
哈哈哈哈哈哈希望是真的
好帖,保存了
一个够嘛
重要的话说三遍是么哈哈
不要抢我的小姐姐
是哦
必须的必
我也来打call
用给你递个电话么
带上我
为小姐姐心动过很多次了
心动ing
怎么试?教教我
蛮有用的
同码
我也很喜欢呢
同码!
找到告诉我
一起学习,天天向上
cool~
我也是呢
我也是哈哈哈
谁不是呢
我希望有花不完的钱
哈哈哈我也是
同被吸引到了
同被诱惑到了
get+1
怎么加?
完美!
是呢
我同意
好看哦
酷的一匹
超绝
你好,我是小姐姐后援会会长哈哈
我也是!
我也没想到
小姐姐的帖子都挺不错的
蛮实用的
下回我也试试
感谢帖主呢
我也可以!
我不信~
是的都好好看
太逆生长了叭
我也觉得是呢
我也喜欢
看到志同道合的胖友了
可惜学不会~
那当然了
真的是被小姐姐的点戳中了
喜欢的嘞
找到了另一个小迷妹
哈哈,我也是
都很有用呢
不要抢我的小姐姐
带上我
喜欢这种风格
可以+1
喜欢
爱了爱了
说的是呢
这个小姐姐很厉害的
真的好
差的不是角度是颜值
很实用呢
小粉丝路过
➕1
棒呆
真是种不完的草
这个好可爱
笔芯
加上我
相当可以
大心心哈哈哈哈
biubiubiu
加个我的
带上我
get了
赶紧拉起粉丝群哈哈
同问
同求
哈哈哈 你这是一条语音评论么
有链接嘛?
说的是呢
我也是
get了
码住
你不是一个人,小姐姐分享的我也很喜欢呢
学起来
哈哈我也是
我也是
喜欢呢
喜欢
是的了
真的是!
写的好棒
加个“!”
真的秀
还是小姐姐写的好吧
秀出新高度
get.
超爱
赞同
哈哈我也是
码住
腻害
真的厉害
同想试试
我也这么想
真可以试试
米兔
我这次就要试一试
我好喜欢
最喜欢干货了
嗯嗯 我也是
是的是的!
哈哈哈是无敌了
是的是的!
好玩
我也是超喜欢
夸爆
炒鸡棒
心动到不行
安排上了
棒棒棒
666
感谢帖主
是的!我都不知道在这里吃了多少安利了
没能逃过被种草
辛苦帖主
喜欢呢
我也是
谢谢帖主
感谢帖主
也适合我,谢谢帖主
是的哦 感谢楼主
是的喂
哈哈哈一样一样
可以可以相当可以
超棒的帖子
棒棒的帖子
也是我喜欢的
我也喜欢这个帖子哈哈
我也爱了
哈哈哈哈哈我也是
已经打开了某宝
干货
我也超爱
赞赞赞
666
我也终于看到适合我的了
wow!
没错,是她是她就是她
谁不是呢
哈哈哈哈哈哈我也是
吃土少女的自虐哈哈哈哈哈
我也是 好喜欢啊
我也是!终于!
必须的!
感觉蛮有用的
你闺蜜:我不吃。哈哈哈哈哈
呼呼,我已经是第二次被种草了
激动!我也是
我也要安利给我朋友
哈哈哈哈哈好巧,我也在安利
我也是!激动
我也爱!
我也在问自己这个问题
我也是呢!超级喜欢
因为要花钱了哈哈
我也超级喜欢
➕1
我也是我也是
我也是!真不容易
哈哈哈我也是!
我也炒鸡喜欢 get!
也戳中我了
wow
要去安利我的姐妹
立刻去分享给姐妹
同求
这个滤镜真好看
小姐姐太棒了
➕1我也想要
仙女➕1
谁不想要呢
瓜子准备啦
同意
我缺的是摄影师吗。我缺的是颜值
也太棒了吧
我也想收藏!
是啊,我也这种感觉
是的呢,我最喜欢的博主
点赞
我最喜欢第二张
喜欢
我先!
好像专业摄影师拍的诶
姐妹,我也能拍
码住哦
okok
d=====( ̄▽ ̄*)b厉害
我也想要连接
我要多学习
小姐姐是我的!
同期待
hhhh
长得美就行
想换头
前排瓜子准备好了
美就一个字
那我就不一样了。我特别喜欢
搓手期待
biubiubiu
举手报名,我也想和小姐姐当朋友
前排先赞一个
这个滤镜可真好看
天气可真好啊
你是调查户口的吗
2333333
我喜欢图2
我家小姐姐最棒
我也是我也是
想知道怎么拍的
我也觉得,一定是男朋友拍的
这是哪里呀
我是你的粉头
火前留名
赞一个赞一个
同感同感
吃下这枚安利喽
赞一个
感觉是专业的相机诶
我先来承包
哼。我先来的
我喜欢封面!
嘿嘿,是可爱的小姐姐没错了
你也可以的
前排留名
小声bb)我也想
我也是!不许跟我抢
嗷嗷嗷我也觉得
同求
我也喜欢!
你走开,小姐姐是我的
爱辽
我也想用。。。
是我的小姐姐
嗷嗷,你不喜欢我了吗
太可爱喽,我喜欢的颜值类型
我也想横着走!
好甜啊
你怎么也这么可爱啊
点头同意
美丽
哼。我先来的
拍照新姿势!
我最喜欢封面
手残党,学不会
哇塞小姐姐好好看,爱了爱了
求教程
➕11111
求连接呀
直接被种草了
感觉很有用
好可爱
同感
种草了哦
咱俩这么多同款吗
可以看看我家的产品哦
行走的种草机
是的呢
新技能get!
This diff is collapsed.
This diff is collapsed.
import pymysql
import traceback
import logging
from vest.request.auto_request import login, time_convs, reply, get_comment, click
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_topic_id(numtime1, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT id,user_id FROM topic WHERE is_online=1 and create_time > '%s' and create_time < '%s' and id not in "
"(select topic_id from reply where create_time > '%s' and create_time < '%s')" % (
numtime1, numtime2, numtime1, numtime2)
)
data = cursor.fetchall()
topic_id = list(data)
logging.info("Database version : %s " % topic_id)
return topic_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def fix_no_comment_click():
try:
numtime1, numtime2 = time_convs(8, 0)
user_id = get_topic_id(numtime1, numtime2)
for i in user_id:
cook = login()
if cook is not None:
click(cook, i[0])
comment = get_comment()
reply(cook, i[0], comment)
except:
logging_exception()
logging.error("catch exception,main :%s" % traceback.format_exc())
import pymysql
import traceback
import logging
from vest.request.auto_request import login, time_convs, follow
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime1, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time > '%s' and create_time < '%s'" % (
numtime1, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
if topic_id:
for i in topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def auto_follow():
try:
numtime1, numtime2 = time_convs(8, 0)
user_id = get_data(numtime1, numtime2)
for j in user_id and user_id:
id = int(j[0])
cookies = login()
if cookies is not None:
follow(cookies, id)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, time_convs, follow
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_commnet_id(numtime):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id FROM reply WHERE create_time > '%s' " % numtime)
data_comment = cursor.fetchall()
cursor.execute(
"SELECT t.user_id from topic t left join reply r on r.topic_id = t.id WHERE r.create_time > '%s'" % numtime)
data_reply_topic = cursor.fetchall()
cursor.execute(
"SELECT r.user_id from reply r left join reply p on r.replied_id = p.replied_id WHERE p.create_time > '%s'" % numtime)
data_reply_reply = cursor.fetchall()
cursor.execute(
"SELECT user_id FROM group_user_role WHERE create_time > '%s' " % numtime)
data_group_follow = cursor.fetchall()
cursor.execute(
"select user_id from account_user WHERE create_time > '%s'" % numtime)
data_new_user = cursor.fetchall()
data_id = list(data_comment)
data1_id = list(data_reply_topic)
data2_id = list(data_group_follow)
data3_id = list(data_new_user)
data_reply = list(data_reply_reply)
all_data = []
all_data.extend(data_id)
all_data.extend(data2_id)
all_data.extend(data3_id)
all_data.extend(data_reply)
all_data.extend(data1_id)
topic_id_list = []
for i in all_data and all_data:
cursor.execute(
"select user_id from user_extra where user_id =" + str(i[0]) + " and is_shadow =0 ")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
def auto_follow_new():
try:
numtime1, numtime2 = time_convs(1, 2)
user_id = get_commnet_id(numtime1)
try:
for j in user_id and user_id:
id = int(j[0])
follow_num = random.randint(0, 1)
for i in range(follow_num):
cookies = login()
if cookies is not None:
follow(cookies, id)
except:
pass
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import logins, pictorial_reply, get_majia_reply, get_pictorial_comment
from vest.request.auto_request import host, user, db, passwd
"""
离线一次性插入{1,4}条评论
"""
def get_data():
try:
print("....")
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT creator_id,id FROM community_pictorial where is_online =True ")
data = cursor.fetchall()
topic_id = list(data)
logging.info("Database version : %s " % topic_id)
return topic_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def principal_offline_comment1():
try:
logging.info("comment offline pictorial")
user_id = get_data()
dicts = {}
for i in user_id:
for num in range(4):
majia_user_id = get_majia_reply(i[0])
cook = logins(majia_user_id)
comment = get_pictorial_comment()
if cook is not None:
logging.info("get cook:%s" % cook)
logging.info("get i[1]:%s" % i[1])
logging.info("get comment:%s" % comment)
pictorial_reply(cook, i[1], comment)
else:
logging.info("no get cookies-------------")
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import logins, pictorial_reply, get_majia, get_pictorial_comment, time_conv_minute
from vest.request.auto_request import host, user, db, passwd
"""
榜单新增内容(仅限在线的)
每半小时一次
过去半小时之内,if
新增在线帖子(既包含马甲用户、又包含普通用户)达到1个时,插入{1,2}条评论
新增在线帖子(既包含马甲用户、又包含普通用户)达到2-5个时,插入{2,3}条评论
新增在线帖子(既包含马甲用户、又包含普通用户)达到>5张时,插入{3,5}条评论
(注意评论作者需要是马甲用户)
过去半小时之内,if
本榜单有新增投票(既包含马甲用户、又包含普通用户),插入{1,2}条评论
评论取自单独的榜单评论列表,并自动随机关联马甲
注意需要禁止本帖作者评论
"""
def get_data(numtime1, numtime2):
try:
print("....")
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT pictorial_id ,count(*) as count FROM community_pictorial_topic WHERE is_online=1 and (create_time >= '%s' and create_time < '%s') group by pictorial_id " % (
numtime1, numtime2))
data = cursor.fetchall()
cursor.execute(
"SELECT pictorial_id FROM topic_vote_cnt WHERE is_deleted = 0 and (create_time >= '%s' and create_time < '%s') group by pictorial_id" % (
numtime1, numtime2))
data_vote = cursor.fetchall()
pictorial_data = list(data)
pictorial_vote = list(data_vote)
logging.info("Database version : %s " % pictorial_data)
logging.info("Database version : %s " % pictorial_vote)
return pictorial_data, pictorial_vote
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def principal_online_comment1():
try:
logging.info("comment offline pictorial")
numtime1, numtime2, minute = time_conv_minute(30, 0)
user_id, data_vote = get_data(numtime1, numtime2)
dicts = {}
random_num = 0
if user_id:
for i in user_id:
if i[1] == 1:
random_num = random.randint(1, 2)
if i[1] >= 2 and i[1] <= 5:
random_num = random.randint(2, 3)
if i[1] > 5:
random_num = random.randint(3, 5)
for num in range(random_num):
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment = get_pictorial_comment()
if cook is not None:
pictorial_reply(cook, i[0], comment)
if data_vote:
for i in data_vote:
random_num = random.randint(1, 2)
for num in range(random_num):
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment = get_pictorial_comment()
if cook is not None:
pictorial_reply(cook, i[0], comment)
else:
logging.error("catch exception,main:%s" % traceback.format_exc())
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
import time
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, click, time_convs
from vest.request.auto_request import host, user, db, passwd
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT distinct(user_id),id FROM topic WHERE is_online=1 and (create_time >= '%s' and create_time <= '%s')" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
def one_seven_topic_comment():
try:
numtime, numtime2 = time_convs(7, 1)
user_id = get_data(numtime, numtime2)
logging.info("get user_id:%s" % user_id)
for i in user_id:
cook = login()
if cook is not None:
click(cook, i[1])
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
from vest.request.auto_request import login, time_conv, get_comment, reply
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
print("....")
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_comment_one():
try:
logging.info("comment one")
numtime1, numtime2 = time_conv(5, 0)
user_id = get_data(numtime1, numtime2)
dicts = {}
if user_id:
for i in user_id:
cook = login()
comment = get_comment()
if cook is not None:
reply(cook, i[1], comment)
else:
logging.error("catch exception,main:%s" % traceback.format_exc())
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import time
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, time_conv, get_comment, reply
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
print("....")
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_comment_three():
try:
logging.info(" answer_reply_three")
numtime1, numtime2 = time_conv(45, 35)
user_id = get_data(numtime1, numtime2)
if user_id:
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
logging.info("get cook;%s" % cook)
comment = get_comment()
if cook is not None:
reply(cook, i[1], comment)
else:
logging.error("catch exception,main:%s" % traceback.format_exc())
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, time_conv, get_comment, reply
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
print("....")
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def true_comment_two():
try:
logging.info("answer_reply_two")
numtime1, numtime2 = time_conv(27, 17)
user_id = get_data(numtime1, numtime2)
dicts = {}
if user_id:
for i in user_id:
rand_num = random.randint(0, 1)
if rand_num == 1:
cook = login()
comment = get_comment()
if cook is not None:
reply(cook, i[1], comment)
else:
logging.error("catch exception,main:%s" % traceback.format_exc())
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
import json
from vest.request.auto_request import time_conv_minute, get_answer_data, reply_answer, set_reply_to_redis, \
reply2, logins, \
get_majia, get_majia_reply
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def answer_reply1():
try:
logging.info("answer_reply_one")
numtime1, numtime2, minute = time_conv_minute(5, 0)
user_id = get_data(numtime1, numtime2)
redis_key1 = "cybertron:set_reply_id:one"
reply_data_comment = []
if user_id:
for i in user_id:
majia_user_id = get_majia()
logging.info("get majia_user-id:%s" % majia_user_id)
cook = logins(majia_user_id)
comment1, comment2 = get_answer_data()
logging.info("get comment1:%s" % comment1)
logging.info("get comment2:%s" % comment2)
if cook is not None:
response = reply_answer(cook, i[1], comment1)
if len(response) > 1:
data_dict = json.loads(response)
reply_id = data_dict["data"]["id"]
reply_user_id = data_dict["data"]["user"]["id"]
topic_id = i[1]
reply_data_comment.append(
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": topic_id,
"majia_user_id": majia_user_id})
redis_client = set_reply_to_redis()
redis_client.hset(redis_key1, str(minute), json.dumps(reply_data_comment))
logging.info("get eeeeeeee:%s" % str(minute - 5))
have_reply1 = redis_client.hget(redis_key1, str(minute - 5))
logging.info("get have_reply1:%s" % have_reply1)
if have_reply1:
result = json.loads(str(have_reply1, encoding="utf-8"))
redis_client.hdel(redis_key1, str(minute - 5))
if result:
for item in result:
majia_user_id = get_majia_reply(item["majia_user_id"])
cook = logins(majia_user_id)
reply2(cook, item["topic_id"], item["answer"], item["id"])
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
import json
from vest.request.auto_request import logins, time_conv, get_answer_data, reply_answer, get_majia, \
set_reply_to_redis
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
print(user_id)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def answer_reply2():
try:
logging.info("comment answer one")
numtime1, numtime2 = time_conv(27, 17)
user_id = get_data(numtime1, numtime2)
redis_key = "cybertron:set_reply_id:two"
reply_data_comment = []
if user_id:
for i in user_id:
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment1, comment2 = get_answer_data()
if cook is not None:
response = reply_answer(cook, i[1], comment1)
if len(response) > 1:
data_dict = json.loads(response)
reply_id = data_dict["data"]["id"]
reply_user_id = data_dict["data"]["user"]["id"]
reply_data_comment.append(
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1],
"majia_user_id": majia_user_id})
redis_client = set_reply_to_redis()
redis_client.set(redis_key, json.dumps(reply_data_comment))
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
import json
from vest.request.auto_request import logins, time_conv, get_answer_data, reply_answer, set_reply_to_redis, get_majia
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and (create_time > '%s' and create_time < '%s' )" % (
numtime, numtime2))
data = cursor.fetchall()
topic_id = list(data)
topic_id_list = []
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
print(user_id)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
def answer_reply3():
try:
logging.info("comment answer one")
numtime1, numtime2 = time_conv(45, 35)
user_id = get_data(numtime1, numtime2)
redis_key1 = "cybertron:set_reply_id:three"
reply_data_comment = []
if user_id:
for i in user_id:
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment1, comment2 = get_answer_data()
if cook is not None:
response = reply_answer(cook, i[1], comment1)
if len(response) > 1:
data_dict = json.loads(response)
reply_id = data_dict["data"]["id"]
reply_user_id = data_dict["data"]["user"]["id"]
reply_data_comment.append(
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1],
"majia_user_id": majia_user_id})
redis_client = set_reply_to_redis()
redis_client.set(redis_key1, json.dumps(reply_data_comment))
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import traceback
import logging
import json
from vest.request.auto_request import set_reply_to_redis, reply2, logins, get_majia_reply
from libs.error import logging_exception
def reply_comment2():
try:
redis_key1 = "cybertron:set_reply_id:two"
redis_client = set_reply_to_redis()
have_reply1 = redis_client.get(redis_key1)
result = json.loads(str(have_reply1, encoding="utf-8"))
if result:
for item in result:
majia_user_id = get_majia_reply(item["majia_user_id"])
cook = logins(majia_user_id)
reply2(cook, item["topic_id"], item["answer"], item["id"])
redis_client.delete(redis_key1)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import traceback
import json
import logging
from vest.request.auto_request import set_reply_to_redis, reply2, logins, get_majia_reply
from libs.error import logging_exception
def reply_comment3():
try:
redis_key1 = "cybertron:set_reply_id:three"
redis_client = set_reply_to_redis()
have_reply1 = redis_client.get(redis_key1)
result = json.loads(str(have_reply1, encoding="utf-8"))
if result:
for item in result:
majia_user_id = get_majia_reply(item["majia_user_id"])
cook = logins(majia_user_id)
reply2(cook, item["topic_id"], item["answer"], item["id"])
redis_client.delete(redis_key1)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
This diff is collapsed.
import pymysql
import traceback
import logging
from vest.request.auto_request import host, user, db, passwd
from libs.cache import redis_client
from libs.error import logging_exception
def get_data():
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute("select user_id from user_extra where is_shadow = 1 ")
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
user_id_list = []
if user_id:
for i in user_id:
cursor.execute("select user_id from topic where user_id = " + str(
i[0]) + " group by user_id having count(user_id) >5")
data = cursor.fetchall()
user_id = list(data)
if len(user_id):
user_id_list.append(user_id[0])
pc.close()
return user_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def auto_user_id():
try:
data = get_data()
file = open("/srv/apps/physical/vest/data/get_user_id.txt", "w")
if data:
for i in data:
file.write(str(i[0]))
file.write("\n")
redis_client.set("get_user_id_data", data)
except:
logging_exception()
logging.error("index_first:%s" % traceback.format_exc())
import requests
import traceback
import logging
import json
from libs.cache import redis_client
from libs.error import logging_exception
# login_url = "http://earth.iyanzhi.com/api/account/login_pwd"
login_url = "http://earth.gmapp.env/api/account/login_pwd"
def index_first():
try:
r1 = requests.get(login_url)
return r1.cookies.get_dict()
except:
logging.error("index_first:%s" % traceback.format_exc())
return None
def get_cook():
try:
data = open("/srv/apps/physical/vest/data/vest_user_email.txt")
list = []
dicts = {}
for i in data:
list.append(i.strip('\n').strip(','))
for i in list:
cookies = index_first()
post_dict = {
'account_type': 2,
'pwd': '123456',
'email': i
}
response = requests.post(
url=login_url,
data=post_dict,
cookies=cookies
)
headers = response.headers
print(response.text)
cook = headers['Set-Cookie'].split(";")
cook = cook[0].split('=')[1]
logging.info("response.text :%s" % response.text)
dicts[i] = cook
return dicts
except:
logging.error("index_first:%s" % traceback.format_exc())
return None
def get_session():
try:
session_key = "majia_login_session"
dicts = get_cook()
for key, value in dicts.items():
redis_client.hset(session_key, key, json.dumps(value))
except:
logging_exception()
logging.error("index_first:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
from vest.request.auto_request import login, time_convs, Urge
from vest.request.auto_request import host, user, passwd
from libs.error import logging_exception
def get_data(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db="physical", port=3306)
cursor = pc.cursor()
cursor.execute(
"select user_id from sl_user_login_status where last_visit_day < '%s' and is_shadow =0 " % numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
pc.close()
return user_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def auto_lunch_app():
try:
numtime1, numtime2 = time_convs(1, 3)
user_id = get_data(numtime2)
for i in user_id:
id = int(i[0])
cook = login()
if cook is not None:
Urge(cook, id)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, time_convs, Urge
from vest.request.auto_request import host, user, passwd
from libs.error import logging_exception
def get_data(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db="physical", port=3306)
cursor = pc.cursor()
cursor.execute(
"select user_id from sl_user_login_status where last_visit_day < '%s' and is_shadow = 0 " % numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
pc.close()
return user_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def auto_lunch_app2():
try:
numtime1, numtime2 = time_convs(1, 3)
user_id = get_data(numtime2)
for i in user_id and user_id:
num = random.randint(0, 1)
if num == 1:
id = int(i[0])
cook = login()
if cook is not None:
Urge(cook, id)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import traceback
import logging
from vest.request.auto_request import login, time_convs, Urge
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
def get_star_useid(numtime1, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and content_level in (4,5) and create_time > '%s' and create_time < '%s'" % (
numtime1, numtime2))
data = cursor.fetchall()
user_id = list(data)
topic_id_list = []
for i in user_id and user_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def auto_star_urge():
try:
numtime1, numtime2 = time_convs(8, 0)
user_id = get_star_useid(numtime1, numtime2)
for j in user_id and user_id:
id = int(j[0])
for i in range(1):
cookies = login()
if cookies is not None:
Urge(cookies, id)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
import pymysql
import random
import traceback
import logging
from vest.request.auto_request import login, time_convs, Urge
from vest.request.auto_request import host, port, passwd, user, db
from libs.error import logging_exception
def get_data(numtime1, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time > '%s' and create_time < '%s'" % (
numtime1, numtime2))
data = cursor.fetchall()
user_id = list(data)
topic_id_list = []
for i in user_id and user_id:
cursor.execute(
"select user_id,is_shadow from user_extra where user_id =" + str(
i[0]) + " and is_online =1 and is_deleted =0")
data = cursor.fetchall()
user_id = list(data)
if (user_id and user_id[0][1] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def auto_urge1():
try:
numtime1, numtime2 = time_convs(8, 0)
logging.info("get numtime1:%s" % numtime1)
logging.info("get numtime2:%s" % numtime2)
user_id = get_data(numtime1, numtime2)
urge_num = random.randint(0, 1)
if urge_num == 1:
for j in user_id and user_id:
id = int(j[0])
cookies = login()
if cookies is not None:
Urge(cookies, id)
except:
logging_exception()
logging.error("catch exception,main:%s" % traceback.format_exc())
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment