Commit 239a34d5 authored by lixiaofang's avatar lixiaofang

add

parent d59a3444
<?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$/auto_commnet.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_commnet.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_request.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_request.py" afterDir="false" />
<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" />
...@@ -24,7 +28,7 @@ ...@@ -24,7 +28,7 @@
<entry key="batch_user_gen" value="2" /> <entry key="batch_user_gen" value="2" />
<entry key="comment" value="2" /> <entry key="comment" value="2" />
<entry key="guanshui" value="2" /> <entry key="guanshui" value="2" />
<entry key="py" value="126" /> <entry key="py" value="128" />
<entry key="txt" value="5" /> <entry key="txt" value="5" />
<entry key="xuqiu" value="2" /> <entry key="xuqiu" value="2" />
</counts> </counts>
...@@ -32,7 +36,7 @@ ...@@ -32,7 +36,7 @@
<usages-collector id="statistics.file.types.open"> <usages-collector id="statistics.file.types.open">
<counts> <counts>
<entry key="PLAIN_TEXT" value="13" /> <entry key="PLAIN_TEXT" value="13" />
<entry key="Python" value="126" /> <entry key="Python" value="128" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.edit"> <usages-collector id="statistics.file.extensions.edit">
...@@ -40,14 +44,14 @@ ...@@ -40,14 +44,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="4140" /> <entry key="py" value="4167" />
<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="4140" /> <entry key="Python" value="4167" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -114,99 +118,115 @@ ...@@ -114,99 +118,115 @@
</session> </session>
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <splitter split-orientation="horizontal" split-proportion="0.5">
<file pinned="false" current-in-tab="false"> <split-first>
<entry file="file://$PROJECT_DIR$/auto_at_once.py"> <leaf>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="-11"> <entry file="file://$PROJECT_DIR$/auto_at_once.py">
<caret line="7" column="22" selection-start-line="7" selection-end-line="8" /> <provider selected="true" editor-type-id="text-editor">
</state> <state relative-caret-position="-11">
</provider> <caret line="7" column="22" selection-start-line="7" selection-end-line="8" />
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="true"> </entry>
<entry file="file://$PROJECT_DIR$/instant.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="552"> <entry file="file://$PROJECT_DIR$/instant.py">
<caret line="73" column="59" lean-forward="true" selection-start-line="73" selection-start-column="59" selection-end-line="73" selection-end-column="59" /> <provider selected="true" editor-type-id="text-editor">
<folding> <state relative-caret-position="1095">
<element signature="e#0#15#0" expanded="true" /> <caret line="73" column="59" lean-forward="true" selection-start-line="73" selection-start-column="59" selection-end-line="73" selection-end-column="59" />
</folding> <folding>
</state> <element signature="e#0#15#0" expanded="true" />
</provider> </folding>
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="false"> </entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="1196"> <entry file="file://$PROJECT_DIR$/auto_user_id.py">
<caret line="86" column="27" selection-start-line="86" selection-start-column="27" selection-end-line="86" selection-end-column="27" /> <provider selected="true" editor-type-id="text-editor">
<folding> <state>
<element signature="e#0#15#0" expanded="true" /> <caret lean-forward="true" />
<marker date="1555668385000" expanded="true" signature="1859:1860" ph="..." /> <folding>
</folding> <element signature="e#1#15#0" expanded="true" />
</state> </folding>
</provider> </state>
</entry> </provider>
</file> </entry>
<file pinned="false" current-in-tab="false"> </file>
<entry file="file://$PROJECT_DIR$/auto_user_id.py"> <file pinned="false" current-in-tab="false">
<provider selected="true" editor-type-id="text-editor"> <entry file="file://$PROJECT_DIR$/auto_click.py">
<state> <provider selected="true" editor-type-id="text-editor">
<caret lean-forward="true" /> <state relative-caret-position="420">
<folding> <caret line="28" column="8" lean-forward="true" selection-start-line="28" selection-start-column="8" selection-end-line="28" selection-end-column="8" />
<element signature="e#1#15#0" expanded="true" /> <folding>
</folding> <element signature="e#0#11#0" expanded="true" />
</state> </folding>
</provider> </state>
</entry> </provider>
</file> </entry>
<file pinned="false" current-in-tab="false"> </file>
<entry file="file://$PROJECT_DIR$/auto_click.py"> <file pinned="false" current-in-tab="false">
<provider selected="true" editor-type-id="text-editor"> <entry file="file://$PROJECT_DIR$/auto_request.py">
<state relative-caret-position="420"> <provider selected="true" editor-type-id="text-editor">
<caret line="28" column="8" lean-forward="true" selection-start-line="28" selection-start-column="8" selection-end-line="28" selection-end-column="8" /> <state relative-caret-position="1850">
<folding> <caret line="273" column="20" selection-start-line="273" selection-start-column="20" selection-end-line="273" selection-end-column="20" />
<element signature="e#0#11#0" expanded="true" /> <folding>
</folding> <element signature="e#0#15#0" expanded="true" />
</state> </folding>
</provider> </state>
</entry> </provider>
</file> </entry>
<file pinned="false" current-in-tab="false"> </file>
<entry file="file://$PROJECT_DIR$/auto_request.py"> <file pinned="false" current-in-tab="true">
<provider selected="true" editor-type-id="text-editor"> <entry file="file://$PROJECT_DIR$/auto_commnet.py">
<state relative-caret-position="671"> <provider selected="true" editor-type-id="text-editor">
<caret line="148" column="19" lean-forward="true" selection-start-line="148" selection-start-column="19" selection-end-line="148" selection-end-column="19" /> <state relative-caret-position="105">
<folding> <caret line="7" column="74" selection-start-line="7" selection-start-column="74" selection-end-line="7" selection-end-column="74" />
<element signature="e#0#15#0" expanded="true" /> </state>
</folding> </provider>
</state> </entry>
</provider> </file>
</entry> <file pinned="false" current-in-tab="false">
</file> <entry file="file://$PROJECT_DIR$/user_session.txt">
<file pinned="false" current-in-tab="false"> <provider selected="true" editor-type-id="text-editor">
<entry file="file://$PROJECT_DIR$/user_session.txt"> <state relative-caret-position="1020">
<provider selected="true" editor-type-id="text-editor"> <caret line="68" column="33" selection-start-line="68" selection-end-line="69" />
<state relative-caret-position="1020"> </state>
<caret line="68" column="33" selection-start-line="68" selection-end-line="69" /> </provider>
</state> </entry>
</provider> </file>
</entry> <file pinned="false" current-in-tab="false">
</file> <entry file="file://$PROJECT_DIR$/auto_click_n.py">
<file pinned="false" current-in-tab="false"> <provider selected="true" editor-type-id="text-editor">
<entry file="file://$PROJECT_DIR$/auto_click_n.py"> <state relative-caret-position="735">
<provider selected="true" editor-type-id="text-editor"> <caret line="49" lean-forward="true" selection-start-line="49" selection-end-line="49" />
<state relative-caret-position="735"> <folding>
<caret line="49" lean-forward="true" selection-start-line="49" selection-end-line="49" /> <element signature="e#0#15#0" expanded="true" />
<folding> </folding>
<element signature="e#0#15#0" expanded="true" /> </state>
</folding> </provider>
</state> </entry>
</provider> </file>
</entry> </leaf>
</file> </split-first>
</leaf> <split-second>
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="56" selection-start-line="6" selection-start-column="56" selection-end-line="6" selection-end-column="56" />
<folding>
<marker date="1555673023000" expanded="true" signature="1693:1694" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-second>
</splitter>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
...@@ -264,7 +284,6 @@ ...@@ -264,7 +284,6 @@
<option value="$PROJECT_DIR$/auto_star_topic.py" /> <option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_follow_new.py" /> <option value="$PROJECT_DIR$/auto_follow_new.py" />
<option value="$PROJECT_DIR$/auto_follow_majia.py" /> <option value="$PROJECT_DIR$/auto_follow_majia.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" />
<option value="$PROJECT_DIR$/auto_urge.py" /> <option value="$PROJECT_DIR$/auto_urge.py" />
<option value="$PROJECT_DIR$/auto_urge_three.py" /> <option value="$PROJECT_DIR$/auto_urge_three.py" />
<option value="$PROJECT_DIR$/auto_every_day.py" /> <option value="$PROJECT_DIR$/auto_every_day.py" />
...@@ -283,10 +302,11 @@ ...@@ -283,10 +302,11 @@
<option value="$PROJECT_DIR$/auto_at_once.py" /> <option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/comment.txt" /> <option value="$PROJECT_DIR$/comment.txt" />
<option value="$PROJECT_DIR$/auto_user_id.py" /> <option value="$PROJECT_DIR$/auto_user_id.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/auto_click.py" /> <option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/offline_comment.py" />
<option value="$PROJECT_DIR$/instant.py" /> <option value="$PROJECT_DIR$/instant.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/offline_comment.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" />
</list> </list>
</option> </option>
</component> </component>
...@@ -509,7 +529,7 @@ ...@@ -509,7 +529,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 content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.1790416" /> <window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.111637704" />
<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" />
...@@ -519,7 +539,7 @@ ...@@ -519,7 +539,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.002072539" /> <window_info anchor="bottom" id="Terminal" order="8" visible="true" weight="0.002072539" />
<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" />
...@@ -703,16 +723,6 @@ ...@@ -703,16 +723,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="150">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py"> <entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120"> <state relative-caret-position="120">
...@@ -872,17 +882,6 @@ ...@@ -872,17 +882,6 @@
<entry file="file://$PROJECT_DIR$/user_id.txt"> <entry file="file://$PROJECT_DIR$/user_id.txt">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1196">
<caret line="86" column="27" selection-start-line="86" selection-start-column="27" selection-end-line="86" selection-end-column="27" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<marker date="1555668385000" expanded="true" signature="1859:1860" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_user_id.py"> <entry file="file://$PROJECT_DIR$/auto_user_id.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state> <state>
...@@ -927,25 +926,42 @@ ...@@ -927,25 +926,42 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_request.py"> <entry file="file://$PROJECT_DIR$/instant.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="671"> <state relative-caret-position="1095">
<caret line="148" column="19" lean-forward="true" selection-start-line="148" selection-start-column="19" selection-end-line="148" selection-end-column="19" /> <caret line="73" column="59" lean-forward="true" selection-start-line="73" selection-start-column="59" selection-end-line="73" selection-end-column="59" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/instant.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="552"> <state relative-caret-position="1850">
<caret line="73" column="59" lean-forward="true" selection-start-line="73" selection-start-column="59" selection-end-line="73" selection-end-column="59" /> <caret line="273" column="20" selection-start-line="273" selection-start-column="20" selection-end-line="273" selection-end-column="20" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="56" selection-start-line="6" selection-start-column="56" selection-end-line="6" selection-end-column="56" />
<folding>
<marker date="1555673023000" expanded="true" signature="1693:1694" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="74" selection-start-line="7" selection-start-column="74" selection-end-line="7" selection-end-column="74" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -5,22 +5,28 @@ import pymysql ...@@ -5,22 +5,28 @@ import pymysql
import random import random
import traceback import traceback
import logging import logging
from auto_request import login, time_convs, reply, get_comment from auto_request import login, time_convs, reply, get_comment,get_user_id
from auto_request import host, user, port, db, passwd from auto_request import host, user, port, db, passwd
import
def get_topic_id(numtime): def get_topic_id(numtime):
try: try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306) pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0) " % numtime) "SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' " % numtime)
data = cursor.fetchall() data = cursor.fetchall()
topic_id = list(data) topic_id = list(data)
logging.info("Database version : %s " % topic_id) user_list = get_user_id()
topic_id_list = []
if topic_id:
for i in topic_id:
if int(i[1]) in user_list:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close() pc.close()
return topic_id return topic_id_list
except: except:
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
......
...@@ -263,3 +263,12 @@ def get_offline_comment(): ...@@ -263,3 +263,12 @@ def get_offline_comment():
# logging.error("catch exception,logins:%s" % traceback.format_exc()) # logging.error("catch exception,logins:%s" % traceback.format_exc())
# #
# return None # return None
def get_user_id():
user_data = open("user_id.txt", "r")
user_list = []
for i in user_data.readlines():
user_list.append(int(i.strip()))
return user_list
\ No newline at end of file
...@@ -4,7 +4,7 @@ import random ...@@ -4,7 +4,7 @@ import random
from log_settings import * from log_settings import *
import traceback import traceback
import logging import logging
from auto_request import get_offline_comment from auto_request import get_offline_comment,get_user_id
from auto_request import host, user, db, passwd from auto_request import host, user, db, passwd
auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner" auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner"
...@@ -18,14 +18,7 @@ auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner" ...@@ -18,14 +18,7 @@ auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner"
# #
# 注意需要禁止本帖作者评论 # 注意需要禁止本帖作者评论
def get_user_id():
user_data = open("user_id.txt", "r")
user_list = []
for i in user_data.readlines():
user_list.append(int(i.strip()))
return user_list
def reply(id, content, user_id): def reply(id, content, user_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