Commit 81c37f5c authored by lixiaofang's avatar lixiaofang

majia new

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