Commit 70e95e89 authored by lixiaofang's avatar lixiaofang

majia new

parent 81c37f5c
......@@ -2,7 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fd1f0b61-1139-44e5-87e7-f8b86ff52376" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/auto_follow_majia.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_follow_majia.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_at_once.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_at_once.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_click.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_click.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -59,40 +60,41 @@
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="README" value="3" />
<entry key="batch user gen" value="1" />
<entry key="batch user gen" value="2" />
<entry key="comment" value="10" />
<entry key="comment_data" value="4" />
<entry key="csv" value="1" />
<entry key="cuigeng" value="3" />
<entry key="data" value="1" />
<entry key="guanshui" value="4" />
<entry key="py" value="135" />
<entry key="py" value="137" />
<entry key="xuqiu" value="3" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="CSV" value="1" />
<entry key="PLAIN_TEXT" value="29" />
<entry key="Python" value="135" />
<entry key="PLAIN_TEXT" value="30" />
<entry key="Python" value="137" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="README" value="4" />
<entry key="batch user gen" value="28" />
<entry key="comment" value="16" />
<entry key="cuigeng" value="1" />
<entry key="data" value="12" />
<entry key="dummy" value="11" />
<entry key="py" value="5355" />
<entry key="py" value="5631" />
<entry key="unr_data" value="1" />
<entry key="xuqiu" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="46" />
<entry key="Python" value="5355" />
<entry key="PLAIN_TEXT" value="74" />
<entry key="Python" value="5631" />
</counts>
</usages-collector>
</session>
......@@ -137,8 +139,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="105" column="4" lean-forward="true" selection-start-line="105" selection-start-column="4" selection-end-line="105" selection-end-column="24" />
<state relative-caret-position="164">
<caret line="22" column="16" selection-start-line="22" selection-start-column="16" selection-end-line="22" selection-end-column="16" />
<folding>
<element signature="e#312#372#0" />
<element signature="e#396#644#0" />
......@@ -185,30 +187,29 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="124">
<caret line="167" selection-start-line="167" selection-end-line="169" selection-end-column="23" />
<state relative-caret-position="146">
<caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#364#424#0" />
<element signature="e#448#676#0" />
<element signature="e#2650#3078#0" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-162">
<caret line="90" column="42" lean-forward="true" selection-start-line="90" selection-start-column="42" selection-end-line="90" selection-end-column="42" />
<state relative-caret-position="-447">
<caret line="35" column="15" selection-start-line="35" selection-start-column="15" selection-end-line="35" selection-end-column="15" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#364#424#0" />
<element signature="e#448#676#0" />
<element signature="e#448#695#0" />
<element signature="e#1299#1695#0" />
<element signature="e#1730#1963#0" />
</folding>
......@@ -260,9 +261,7 @@
<option value="$PROJECT_DIR$/auto_urge.py" />
<option value="$PROJECT_DIR$/auto_follow.py" />
<option value="$PROJECT_DIR$/auto_every.py" />
<option value="$PROJECT_DIR$/batch user gen" />
<option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" />
<option value="$PROJECT_DIR$/auto_click_n.py" />
<option value="$PROJECT_DIR$/auto_lunch_app.py" />
......@@ -270,14 +269,16 @@
<option value="$PROJECT_DIR$/auto_pick_five.py" />
<option value="$PROJECT_DIR$/auto_pick.py" />
<option value="$PROJECT_DIR$/auto_urge_three.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/exercise.py" />
<option value="$PROJECT_DIR$/batch user gen" />
<option value="$PROJECT_DIR$/auto_follow_majia.py" />
<option value="$PROJECT_DIR$/exercise.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-108" />
<option name="x" value="13" />
<option name="y" value="23" />
<option name="width" value="1280" />
<option name="height" value="727" />
......@@ -413,7 +414,7 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="641" y="73" width="1280" height="727" extended-state="1" />
<frame x="13" y="23" width="1280" height="727" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19301033" />
......@@ -421,13 +422,13 @@
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32921174" />
<window_info anchor="bottom" id="Run" order="2" weight="0.296063" />
<window_info anchor="bottom" id="Run" order="2" weight="0.4015748" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39258114" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.09448819" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.122834645" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
......@@ -523,13 +524,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/batch user gen">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" selection-start-line="25" selection-end-line="25" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_every.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400">
......@@ -610,22 +604,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" selection-start-line="7" selection-end-line="7" selection-end-column="60" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#243#302#0" />
<element signature="e#322#841#0" />
<element signature="e#1116#1287#0" />
<element signature="e#1317#1762#0" />
<element signature="e#1798#2261#0" />
<element signature="e#2295#3097#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_pick.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
......@@ -641,19 +619,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="124">
<caret line="167" selection-start-line="167" selection-end-line="169" selection-end-column="23" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#364#424#0" />
<element signature="e#448#676#0" />
<element signature="e#2650#3078#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge_three.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="283">
......@@ -686,13 +651,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/exercise.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="17" lean-forward="true" selection-start-line="12" selection-start-column="17" selection-end-line="12" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_pick_five.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="625">
......@@ -708,10 +666,54 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/batch user gen">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="244">
<caret line="20" column="22" selection-start-line="20" selection-start-column="22" selection-end-line="20" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" selection-start-line="7" selection-end-line="7" selection-end-column="60" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#243#302#0" />
<element signature="e#322#841#0" />
<element signature="e#1116#1287#0" />
<element signature="e#1317#1762#0" />
<element signature="e#1798#2261#0" />
<element signature="e#2295#3097#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/exercise.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<caret line="26" column="12" lean-forward="true" selection-start-line="26" selection-start-column="12" selection-end-line="26" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-447">
<caret line="35" column="15" selection-start-line="35" selection-start-column="15" selection-end-line="35" selection-end-column="15" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#364#424#0" />
<element signature="e#448#695#0" />
<element signature="e#1299#1695#0" />
<element signature="e#1730#1963#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="105" column="4" lean-forward="true" selection-start-line="105" selection-start-column="4" selection-end-line="105" selection-end-column="24" />
<state relative-caret-position="164">
<caret line="22" column="16" selection-start-line="22" selection-start-column="16" selection-end-line="22" selection-end-column="16" />
<folding>
<element signature="e#312#372#0" />
<element signature="e#396#644#0" />
......@@ -722,16 +724,14 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-162">
<caret line="90" column="42" lean-forward="true" selection-start-line="90" selection-start-column="42" selection-end-line="90" selection-end-column="42" />
<state relative-caret-position="146">
<caret line="26" lean-forward="true" selection-start-line="26" selection-end-line="26" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#364#424#0" />
<element signature="e#448#676#0" />
<element signature="e#1299#1695#0" />
<element signature="e#1730#1963#0" />
<element signature="e#2650#3078#0" />
</folding>
</state>
</provider>
......
......@@ -25,11 +25,9 @@ def get_majia():
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, 300)
maj = random.randint(1,len(list))
user_id=list[maj]
......@@ -39,20 +37,14 @@ def login():
# time.sleep(random.randint(300, 500))
num_majia = random.randint(1, 300)
# user_id=majia[num_majia]
user = 's_PzFznI@shadow.com'
pwd = '123456'
user_id=get_majia()
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':user_id
}
response = requests.post(
url=login_url,
......@@ -201,26 +193,26 @@ if __name__ == "__main__":
#get majia zhanghao
data = get_follw_majia(numtime, id)
dict = {}
for i in data:
if i[0] not in dict:
dict.setdefault(i[0], [])
dict[i[0]].append(i[1])
else:
dict[i[0]].append(i[1])
for key, value in dict.items():
cookies = logins(key)
for id in value:
follow(cookies, id)
# data = get_follw_majia(numtime, id)
#
# dict = {}
#
# for i in data:
#
# if i[0] not in dict:
# dict.setdefault(i[0], [])
# dict[i[0]].append(i[1])
#
# else:
# dict[i[0]].append(i[1])
#
# for key, value in dict.items():
#
# cookies = logins(key)
#
# for id in value:
#
# follow(cookies, id)
......
......@@ -28,11 +28,9 @@ def get_majia():
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, 300)
maj = random.randint(1,len(list))
user_id=list[maj]
......@@ -44,13 +42,7 @@ def login():
# time.sleep(random.randint(300, 500))
num_majia = random.randint(1, 300)
user_id=get_majia[num_majia]
# user = 's_PzFznI@shadow.com'
#
# pwd = '123456'
user_id=get_majia()
cookies = index_first()
......
......@@ -14,24 +14,30 @@ def index_first():
return r1.cookies.get_dict()
def login():
def get_majia():
# time.sleep(random.randint(300, 500))
data = open("batch user gen")
num_majia = random.randint(1, 300)
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
# user_id=majia[num_majia]
# time.sleep(random.randint(0, 500))
user = 's_PzFznI@shadow.com'
maj = random.randint(1, len(list))
pwd = '123456'
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -47,8 +53,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def click(cookies_get, id):
......@@ -117,7 +121,7 @@ if __name__ == "__main__":
cookies = index_first()
cook=login()
cook=logins()
click(cook, rand_id)
......@@ -28,36 +28,22 @@ def get_majia():
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, len(list))
maj = random.randint(1, 300)
user_id=list[maj]
print(user_id)
return user_id
def login():
# time.sleep(random.randint(300, 500))
num_majia = random.randint(1, 300)
user_id=list[maj-1]
# user_id=majia[num_majia]
return list
user = 's_PzFznI@shadow.com'
pwd = '123456'
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -73,8 +59,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def follow(cookies_get, id):
......@@ -123,7 +107,7 @@ if __name__ == "__main__":
cookies = index_first()
cook=login()
cook=logins()
follow(cook, id)
......
......@@ -17,22 +17,30 @@ def index_first():
return r1.cookies.get_dict()
def login():
def get_majia():
num_majia = random.randint(1, 300)
data = open("batch user gen")
# user_id=majia[num_majia]
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
user = 's_FF3qUO@shadow.com'
# time.sleep(random.randint(0, 500))
pwd = '123456'
maj = random.randint(1, len(list))
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -48,8 +56,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def reply(cookies_get,id,content):
......@@ -114,7 +120,7 @@ if __name__ == "__main__":
for i in topic_id:
cook = login()
cook = logins()
comment = get_comment()
......
......@@ -14,24 +14,30 @@ def index_first():
r1=requests.get(login_url)
return r1.cookies.get_dict()
def login():
def get_majia():
# time.sleep(random.randint(300, 500))
data = open("batch user gen")
num_majia = random.randint(1, 300)
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
# user_id=majia[num_majia]
# time.sleep(random.randint(0, 500))
user = 's_PzFznI@shadow.com'
maj = random.randint(1, len(list))
pwd = '123456'
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -137,7 +143,7 @@ if __name__ == "__main__":
# time.sleep(random.randint(500, 1500))
cookies=login()
cookies=logins()
follow(cookies, id)
......@@ -154,7 +160,7 @@ if __name__ == "__main__":
# time.sleep(random.randint(500, 1500))
cookies = login()
cookies = logins()
pick(cookies, id)
......
......@@ -12,24 +12,30 @@ def index_first():
r1=requests.get(login_url)
return r1.cookies.get_dict()
def login():
def get_majia():
# time.sleep(random.randint(300, 500))
data = open("batch user gen")
num_majia = random.randint(1, 300)
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
# user_id=majia[num_majia]
# time.sleep(random.randint(0, 500))
user = 's_PzFznI@shadow.com'
maj = random.randint(1, len(list))
pwd = '123456'
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -174,7 +180,7 @@ if __name__ == "__main__":
for i in range(follow_num):
cookies = login()
cookies = logins()
follow(cookies, id)
......
......@@ -25,13 +25,11 @@ def get_majia():
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]
maj = random.randint(1, len(list))
user_id=list[maj-1]
return list
......@@ -94,7 +92,6 @@ def get_follw_majia(numtime,id):
return data
if __name__ == "__main__":
numtime=time_conv()
......
......@@ -32,36 +32,22 @@ def get_majia():
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, len(list))
maj = random.randint(1, 300)
user_id=list[maj]
print(user_id)
return user_id
def login():
# time.sleep(random.randint(300, 500))
num_majia = random.randint(1, 300)
user_id=list[maj-1]
# user_id=majia[num_majia]
return list
user = 's_PzFznI@shadow.com'
pwd = '123456'
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -77,8 +63,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def follow(cookies_get, id):
......@@ -143,7 +127,7 @@ if __name__ == "__main__":
cookies = index_first()
cook=login()
cook=logins()
pick(cook, id)
......
......@@ -14,22 +14,30 @@ def index_first():
return r1.cookies.get_dict()
def login():
def get_majia():
num_majia = random.randint(1, 300)
data = open("batch user gen")
# user_id=majia[num_majia]
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
user = 's_PzFznI@shadow.com'
# time.sleep(random.randint(0, 500))
pwd = '123456'
maj = random.randint(1, len(list))
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -202,7 +210,7 @@ if __name__ == "__main__":
for x in range(pick_num):
cookies = login()
cookies = logins()
pick(cookies, i)
......
......@@ -20,40 +20,31 @@ def index_first():
return r1.cookies.get_dict()
def get_majia():
data = open("batch user gen")
list = []
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, 300)
user_id = list[maj]
print(user_id)
return user_id
def login():
# time.sleep(random.randint(300, 500))
num_majia = random.randint(1, 300)
maj = random.randint(1, len(list))
# user_id=majia[num_majia]
user_id=list[maj-1]
user = 's_PzFznI@shadow.com'
return list
pwd = '123456'
def logins(id):
cookies = index_first()
post_dict = {
'account_type': 2,
'pwd': pwd,
'email': user
post_dict={
'account_type':2,
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -61,7 +52,7 @@ def login():
cookies=cookies
)
headers = response.headers
headers=response.headers
cook = headers['Set-Cookie'].split(";")
......@@ -69,8 +60,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def Urge(cookies_get, id):
......@@ -89,7 +78,6 @@ def time_conv(numtime):
yes_time_str = yes_time.strftime('%Y-%m-%d')
return yes_time_str
def get_data(numtime):
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db="alpha", port=3306)
......@@ -102,7 +90,6 @@ def get_data(numtime):
db.close()
return user_id
if __name__ == "__main__":
# time.sleep(random.randint(3000,4500))
......@@ -118,9 +105,9 @@ if __name__ == "__main__":
for i in range(urge_num):
cookies = index_first()
cook = login()
cook = logins()
follow(cook, id)
Urge(cook, id)
......
......@@ -30,26 +30,22 @@ def get_majia():
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, len(list))
maj = random.randint(1, 300)
user_id=list[maj]
return user_id
user_id=list[maj-1]
def login():
return list
user_id=get_majia()
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':'123456',
'email':user_id
'email':id
}
response = requests.post(
url=login_url,
......@@ -65,8 +61,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def click(cookies_get, id):
......@@ -165,7 +159,7 @@ if __name__ == "__main__":
for i in range(urge_num):
cookies = login()
cookies = logins()
follow(cookies,id)
......
......@@ -14,22 +14,30 @@ def index_first():
r1=requests.get(login_url)
return r1.cookies.get_dict()
def login():
def get_majia():
num_majia = random.randint(1, 300)
data = open("batch user gen")
# user_id=majia[num_majia]
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
user = 's_PzFznI@shadow.com'
# time.sleep(random.randint(0, 500))
pwd = '123456'
maj = random.randint(1, len(list))
user_id=list[maj-1]
return list
def logins(id):
cookies = index_first()
post_dict={
'account_type':2,
'pwd':pwd,
'email':user
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -121,7 +129,7 @@ if __name__ == "__main__":
for i in range(urge_num):
cookies=login()
cookies=logins()
Urge(cookies, id)
......@@ -142,7 +150,7 @@ if __name__ == "__main__":
for i in range(1):
cookies = login()
cookies = logins()
Urge(cookies, id)
......
......@@ -21,39 +21,29 @@ def index_first():
return r1.cookies.get_dict()
def get_majia():
data = open("batch user gen")
list = []
list=[]
for i in data:
list.append(i.strip('\n').strip(','))
# time.sleep(random.randint(0, 500))
maj = random.randint(1, 300)
user_id = list[maj]
print(user_id)
return user_id
maj = random.randint(1, len(list))
def login():
# time.sleep(random.randint(300, 500))
user_id=list[maj-1]
num_majia = random.randint(1, 300)
return list
# user_id=majia[num_majia]
user = 's_PzFznI@shadow.com'
pwd = '123456'
def logins(id):
cookies = index_first()
post_dict = {
'account_type': 2,
'pwd': pwd,
'email': user
post_dict={
'account_type':2,
'pwd':'123456',
'email':id
}
response = requests.post(
url=login_url,
......@@ -61,7 +51,7 @@ def login():
cookies=cookies
)
headers = response.headers
headers=response.headers
cook = headers['Set-Cookie'].split(";")
......@@ -69,8 +59,6 @@ def login():
print(response.text, 'url')
print(cook)
return {'sessionid': cook}
def pick(cookies_get,id):
......@@ -120,7 +108,7 @@ if __name__ == "__main__":
for i in range(urge_num):
cookies = index_first()
cook = login()
cook = logins()
pick(cook, id)
......
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