Commit 81c37f5c authored by lixiaofang's avatar lixiaofang

majia new

parent e23caac3
This diff is collapsed.
......@@ -46,18 +46,18 @@ def login():
num_majia = random.randint(1, 300)
# user_id=majia[num_majia]
user_id=get_majia[num_majia]
user = 's_PzFznI@shadow.com'
pwd = '123456'
# user = 's_PzFznI@shadow.com'
#
# pwd = '123456'
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':user_id
}
response = requests.post(
url=login_url,
......
......@@ -28,12 +28,12 @@ def get_majia():
# time.sleep(random.randint(0, 500))
#
# maj = random.randint(1, len(list))
#
# user_id=list[maj]
maj = random.randint(1, 300)
user_id=list[maj]
return user_id
return list
def logins(id):
......@@ -84,7 +84,7 @@ def get_follw_majia(numtime,id):
cursor = db.cursor()
print("---------")
cursor.execute("SELECT user_id,follow_id FROM user_follow WHERE create_time < = '%s' " % numtime)
cursor.execute("SELECT user_id,follow_id FROM user_follow WHERE create_time <= '%s' ",(numtime))
data = cursor.fetchall()
......@@ -97,7 +97,7 @@ def get_follw_majia(numtime,id):
if __name__ == "__main__":
numtime=time_conv(3)
numtime=time_conv()
# get majia zhanghao
......@@ -116,7 +116,7 @@ if __name__ == "__main__":
for key, value in dict.items():
majia =1,2,3,4,5,6,7
majia =get_majia()
if key in majia:
......
This diff is collapsed.
x=1
d=1,2,3,4,4,5,6,6
if x in d:
# import random
#
#
# def get_majia():
#
# data = open("batch user gen")
#
# list=[]
# for i in data:
# list.append(i.strip('\n').strip(','))
#
#
# # time.sleep(random.randint(0, 500))
#
#
# maj = random.randint(1, len(list))
#
# user_id=list[maj]
#
# return user_id
#
# print(get_majia())
list=[1,23,4,5]
x= 5
if x in list:
print(x)
\ No newline at end of file
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