Commit 9553bc0a authored by lixiaofang's avatar lixiaofang

add

parent 9a0093ff
......@@ -2,7 +2,9 @@
<project version="4">
<component name="ChangeListManager">
<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" />
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_request.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_request.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/comment.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/comment.txt" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -27,13 +29,13 @@
<entry key="comment" value="2" />
<entry key="guanshui" value="2" />
<entry key="py" value="123" />
<entry key="txt" value="1" />
<entry key="txt" value="3" />
<entry key="xuqiu" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="PLAIN_TEXT" value="9" />
<entry key="PLAIN_TEXT" value="11" />
<entry key="Python" value="123" />
</counts>
</usages-collector>
......@@ -42,14 +44,14 @@
<entry key="comment" value="59" />
<entry key="dummy" value="6" />
<entry key="guanshui" value="2" />
<entry key="py" value="2726" />
<entry key="py" value="2730" />
<entry key="xuqiu" value="223" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="290" />
<entry key="Python" value="2726" />
<entry key="Python" value="2730" />
</counts>
</usages-collector>
</session>
......@@ -129,11 +131,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="478">
<caret line="68" column="65" selection-start-line="68" selection-start-column="65" selection-end-line="68" selection-end-column="65" />
<state relative-caret-position="358">
<caret line="60" column="40" selection-start-line="60" selection-start-column="40" selection-end-line="60" selection-end-column="40" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......@@ -153,11 +155,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<caret line="226" column="4" selection-start-line="226" selection-start-column="4" selection-end-line="226" selection-end-column="4" />
<state relative-caret-position="295">
<caret line="227" column="15" selection-start-line="227" selection-start-column="15" selection-end-line="227" selection-end-column="15" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......@@ -195,7 +197,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/xuqiu" />
<option value="$PROJECT_DIR$/unr_data" />
<option value="$PROJECT_DIR$/cuigeng" />
<option value="$PROJECT_DIR$/README" />
......@@ -244,8 +245,9 @@
<option value="$PROJECT_DIR$/_celery.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/offline_comment.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/comment.txt" />
</list>
</option>
</component>
......@@ -467,17 +469,17 @@
<layout>
<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 content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.109004736" />
<window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.13375461" />
<window_info id="DB Browser" order="3" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32909092" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3284974" />
<window_info anchor="bottom" id="Run" order="2" weight="0.0" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.56363636" />
<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.28911918" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.35440415" />
<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="DB Execution Console" order="11" />
......@@ -551,7 +553,6 @@
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/xuqiu" />
<entry file="file://$PROJECT_DIR$/auto_start_up.py" />
<entry file="file://$PROJECT_DIR$/cuigeng" />
<entry file="file://$PROJECT_DIR$/comment" />
......@@ -844,6 +845,16 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="358">
<caret line="60" column="40" selection-start-line="60" selection-start-column="40" selection-end-line="60" selection-end-column="40" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142">
......@@ -864,20 +875,17 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<entry file="file://$PROJECT_DIR$/comment.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<caret line="226" column="4" selection-start-line="226" selection-start-column="4" selection-end-line="226" selection-end-column="4" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
<state relative-caret-position="910">
<caret line="1932" column="5" selection-start-line="1932" selection-start-column="5" selection-end-line="1932" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="478">
<caret line="68" column="65" selection-start-line="68" selection-start-column="65" selection-end-line="68" selection-end-column="65" />
<state relative-caret-position="295">
<caret line="227" column="15" selection-start-line="227" selection-start-column="15" selection-end-line="227" selection-end-column="15" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......
......@@ -248,17 +248,17 @@ def get_offline_comment():
return None
def logins():
try:
user_id = get_majia()
cookies = get_cookies(user_id)
if cookies is not None:
return {'sessionid': cookies}
except:
logging.error("catch exception,logins:%s" % traceback.format_exc())
return None
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
......@@ -30,6 +30,7 @@ data = get_data(time)
file = open("user_id.txt")
for i in data:
file.write(i)
file.write("\n")
......
......@@ -30,7 +30,7 @@ def get_data(numtime, numtime2):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute(
"SELECT id FROM topic WHERE is_online =1 and (create_time < %s and create_time > %s) and (content_level = 4 or content_level = 5) and user_id in (select user_id from user_extra where is_shadow = 1)",
"SELECT id,user_id FROM topic WHERE is_online =1 and (create_time < %s and create_time > %s) and (content_level = 4 or content_level = 5) and user_id in (select user_id from user_extra where is_shadow = 1)",
(numtime, numtime2))
data = cursor.fetchall()
user_id = list(data)
......@@ -46,7 +46,12 @@ if __name__ == "__main__":
try:
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"]]
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"],
["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"],
["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"]]
for i in time_list:
......@@ -60,17 +65,10 @@ if __name__ == "__main__":
comment_list = get_offline_comment()
logging.info("get comment_list:%s"%comment_list)
for i in range(rand_num):
cook = logins()
logging.info("get comment_list:%s" % rand_num)
comment = comment_list[i]
reply(cook, id, comment)
reply(id[0], comment)
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