Commit ec2358c2 authored by lixiaofang's avatar lixiaofang

add

parent 0cc7f633
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<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$/offline_comment.py" beforeDir="false" afterPath="$PROJECT_DIR$/offline_comment.py" afterDir="false" />
</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" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -40,14 +42,14 @@ ...@@ -40,14 +42,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="2957" /> <entry key="py" value="2994" />
<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="2957" /> <entry key="Python" value="2994" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -127,8 +129,8 @@ ...@@ -127,8 +129,8 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/offline_comment.py"> <entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="514"> <state relative-caret-position="519">
<caret line="86" column="35" selection-start-line="86" selection-start-column="35" selection-end-line="86" selection-end-column="35" /> <caret line="94" column="24" selection-start-line="94" selection-start-column="24" selection-end-line="94" selection-end-column="24" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -168,8 +170,8 @@ ...@@ -168,8 +170,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<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="-448"> <state relative-caret-position="88">
<caret line="38" selection-start-line="38" selection-end-line="38" /> <caret line="112" selection-start-line="112" selection-end-line="128" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -485,6 +487,7 @@ ...@@ -485,6 +487,7 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-322" y="-1080" width="1920" height="1080" extended-state="6" /> <frame x="-322" y="-1080" width="1920" height="1080" extended-state="6" />
<editor active="true" />
<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" />
...@@ -498,7 +501,7 @@ ...@@ -498,7 +501,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 active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.25492227" /> <window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.21865284" />
<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" />
...@@ -879,16 +882,6 @@ ...@@ -879,16 +882,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-448">
<caret line="38" selection-start-line="38" selection-end-line="38" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/user_session.txt"> <entry file="file://$PROJECT_DIR$/user_session.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="386"> <state relative-caret-position="386">
...@@ -903,10 +896,20 @@ ...@@ -903,10 +896,20 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="112" selection-start-line="112" selection-end-line="128" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py"> <entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="514"> <state relative-caret-position="519">
<caret line="86" column="35" selection-start-line="86" selection-start-column="35" selection-end-line="86" selection-end-column="35" /> <caret line="94" column="24" selection-start-line="94" selection-start-column="24" selection-end-line="94" selection-end-column="24" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
......
...@@ -10,10 +10,7 @@ import logging ...@@ -10,10 +10,7 @@ import logging
from auto_request import login, reply, get_offline_comment, time_convs from auto_request import login, reply, get_offline_comment, time_convs
from auto_request import host, user, db, passwd from auto_request import host, user, db, passwd
auto_click_url = "http://earth.igengmei.com/api/v1/like" auto_reply_url = "http://api/v1/reply/create_for_inner"
auto_reply_url = "http://earth.igengmei.com/api/v1/reply/create"
auto_follow_url = "http://earth.igengmei.com/api/v1/follow"
auto_urge_url = "http://earth.igengmei.com/api/v1/user/urge"
# 对所有马甲生产的帖子(包含历史帖子) # 对所有马甲生产的帖子(包含历史帖子)
...@@ -24,6 +21,22 @@ auto_urge_url = "http://earth.igengmei.com/api/v1/user/urge" ...@@ -24,6 +21,22 @@ auto_urge_url = "http://earth.igengmei.com/api/v1/user/urge"
# #
# 注意需要禁止本帖作者评论 # 注意需要禁止本帖作者评论
def reply(id, content, user_id):
try:
post_dict = {
'user_id': user_id,
'topic_id': id,
'content': content
}
response = requests.post(url=auto_reply_url,
data=post_dict)
logging.info("response.text:%s" % response.text)
except:
logging.error("catch exception,logins:%s" % traceback.format_exc())
def get_data(numtime, numtime2): def get_data(numtime, numtime2):
try: try:
...@@ -46,19 +59,18 @@ if __name__ == "__main__": ...@@ -46,19 +59,18 @@ if __name__ == "__main__":
try: try:
time_list = [["2012-03-30 15:57:49.000000", "2010-03-30 15:57:49.000000"], time_list = [["2012-03-30 15:57:49.000000", "2010-03-30 15:57:49.000000"]]
["2015-03-30 15:57:49.000000", "2012-03-30 15:57:49.000000"], # ["2015-03-30 15:57:49.000000", "2012-03-30 15:57:49.000000"],
["2016-03-30 15:57:49.000000", "2015-03-30 15:57:49.000000"], # ["2016-03-30 15:57:49.000000", "2015-03-30 15:57:49.000000"],
["2017-03-30 15:57:49.000000", "2016-03-30 15:57:49.000000"], # ["2017-03-30 15:57:49.000000", "2016-03-30 15:57:49.000000"],
["2018-03-30 15:57:49.000000", "2017-03-30 15:57:49.000000"], # ["2018-03-30 15:57:49.000000", "2017-03-30 15:57:49.000000"],
["2019-03-30 15:57:49.000000", "2018-03-30 15:57:49.000000"]] # ["2019-03-30 15:57:49.000000", "2018-03-30 15:57:49.000000"]]
user_data = open("user_id.txt","r") user_data = open("user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
user_list.append(i) user_list.append(i)
for i in time_list: for i in time_list:
...@@ -80,10 +92,9 @@ if __name__ == "__main__": ...@@ -80,10 +92,9 @@ if __name__ == "__main__":
comment_list = get_offline_comment() comment_list = get_offline_comment()
for i in range(rand_num): for i in range(rand_num):
comment = comment_list[i] comment = comment_list[i]
reply(id[0], comment) reply(id[0], comment, user_id, )
except: except:
......
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