Commit dcb2458f authored by lixiaofang's avatar lixiaofang

add

parent bc3bc871
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fd1f0b61-1139-44e5-87e7-f8b86ff52376" name="Default Changelist" comment=""> <list default="true" id="fd1f0b61-1139-44e5-87e7-f8b86ff52376" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_commnet.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_commnet.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
<entry key="comment" value="59" /> <entry key="comment" value="59" />
<entry key="dummy" value="6" /> <entry key="dummy" value="6" />
<entry key="guanshui" value="2" /> <entry key="guanshui" value="2" />
<entry key="py" value="5899" /> <entry key="py" value="5925" />
<entry key="xuqiu" value="223" /> <entry key="xuqiu" value="223" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.edit"> <usages-collector id="statistics.file.types.edit">
<counts> <counts>
<entry key="PLAIN_TEXT" value="290" /> <entry key="PLAIN_TEXT" value="290" />
<entry key="Python" value="5899" /> <entry key="Python" value="5925" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -181,11 +181,11 @@ ...@@ -181,11 +181,11 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click_n.py"> <entry file="file://$PROJECT_DIR$/auto_click_n.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-466"> <state relative-caret-position="916">
<caret line="18" column="35" lean-forward="true" selection-start-line="18" selection-start-column="35" selection-end-line="18" selection-end-column="35" /> <caret line="63" column="35" selection-start-line="63" selection-start-column="35" selection-end-line="63" selection-end-column="35" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -193,11 +193,11 @@ ...@@ -193,11 +193,11 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_commnet.py"> <entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="232"> <state relative-caret-position="166">
<caret line="54" column="22" selection-start-line="54" selection-start-column="22" selection-end-line="54" selection-end-column="22" /> <caret line="54" column="43" lean-forward="true" selection-start-line="54" selection-start-column="43" selection-end-line="54" selection-end-column="43" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -307,9 +307,9 @@ ...@@ -307,9 +307,9 @@
<option value="$PROJECT_DIR$/auto_request.py" /> <option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/testss.py" /> <option value="$PROJECT_DIR$/testss.py" />
<option value="$PROJECT_DIR$/offline_comment.py" /> <option value="$PROJECT_DIR$/offline_comment.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_click_n.py" /> <option value="$PROJECT_DIR$/auto_click_n.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" /> <option value="$PROJECT_DIR$/auto_commnet.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
</list> </list>
</option> </option>
</component> </component>
...@@ -531,7 +531,7 @@ ...@@ -531,7 +531,7 @@
<layout> <layout>
<window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" /> <window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" />
<window_info id="Favorites" order="1" side_tool="true" /> <window_info id="Favorites" order="1" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.16918188" /> <window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.16918188" />
<window_info id="DB Browser" order="3" /> <window_info id="DB Browser" order="3" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3284974" /> <window_info anchor="bottom" id="Find" order="1" weight="0.3284974" />
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" order="8" visible="true" weight="0.0" /> <window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.19376026" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="10" /> <window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="bottom" id="DB Execution Console" order="11" /> <window_info anchor="bottom" id="DB Execution Console" order="11" />
...@@ -856,16 +856,6 @@ ...@@ -856,16 +856,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="232">
<caret line="54" column="22" selection-start-line="54" selection-start-column="22" selection-end-line="54" selection-end-column="22" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_request.py"> <entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1185"> <state relative-caret-position="1185">
...@@ -888,8 +878,18 @@ ...@@ -888,8 +878,18 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_click_n.py"> <entry file="file://$PROJECT_DIR$/auto_click_n.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-466"> <state relative-caret-position="916">
<caret line="18" column="35" lean-forward="true" selection-start-line="18" selection-start-column="35" selection-end-line="18" selection-end-column="35" /> <caret line="63" column="35" selection-start-line="63" selection-start-column="35" selection-end-line="63" selection-end-column="35" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="166">
<caret line="54" column="43" lean-forward="true" selection-start-line="54" selection-start-column="43" selection-end-line="54" selection-end-column="43" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
......
...@@ -31,8 +31,6 @@ def get_topic_id(numtime1, numtime2): ...@@ -31,8 +31,6 @@ def get_topic_id(numtime1, numtime2):
user_id = list(data) user_id = list(data)
if user_id: if user_id:
topic_id_list.append(i) topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close() pc.close()
return topic_id_list return topic_id_list
except: except:
...@@ -48,49 +46,45 @@ if __name__ == "__main__": ...@@ -48,49 +46,45 @@ if __name__ == "__main__":
for i in time_list: for i in time_list:
numtime1,numtime2 = time_convs(i + 1, i - 1) numtime1, numtime2 = time_convs(i + 1, i - 1)
topic_id = get_topic_id(numtime1,numtime2) topic_id = get_topic_id(numtime1, numtime2)
dicts = {} dicts = {}
if topic_id: for i in topic_id and topic_id:
for i in topic_id:
if i[1] not in dicts.keys():
dicts.setdefault(i[1], []) if i[1] not in dicts.keys():
dicts[i[1]].append(i[0]) dicts.setdefault(i[1], [])
else: dicts[i[1]].append(i[0])
dicts[i[1]].append(i[0])
logging.info("get dicts:%s" % dicts) else:
dicts[i[1]].append(i[0])
for key, value in dicts.items(): logging.info("get dicts:%s" % dicts)
rand_num = random.randint(0, len(value) - 1) for key, value in dicts.items():
rand_id = value[rand_num] rand_num = random.randint(0, len(value) - 1)
comment = get_comment() rand_id = value[rand_num]
logging.info("get comment:%s" % comment) comment = get_comment()
for i in range(1): logging.info("get comment:%s" % comment)
time.sleep(random.randint(10, 20)) for i in range(1):
cook = login() time.sleep(random.randint(10, 20))
print(cook) cook = login()
if cook is not None: if cook is not None:
reply(cook, key, comment) reply(cook, rand_id, comment)
time.sleep(300) time.sleep(300)
except: except:
logging.error("catch exception,main :%s" % traceback.format_exc()) logging.error("catch exception,main :%s" % traceback.format_exc())
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