Commit 8809c9e1 authored by lixiaofang's avatar lixiaofang

add

parent 62fb3e98
......@@ -3,8 +3,10 @@
<component name="ChangeListManager">
<list default="true" id="7b835479-ee84-40d6-9b97-0e9285d92119" 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$/answer_reply1.py" beforeDir="false" afterPath="$PROJECT_DIR$/answer_reply1.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_request.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_request.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/answer_reply2.py" beforeDir="false" afterPath="$PROJECT_DIR$/answer_reply2.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/answer_reply3.py" beforeDir="false" afterPath="$PROJECT_DIR$/answer_reply3.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/reply_comment2.py" beforeDir="false" afterPath="$PROJECT_DIR$/reply_comment2.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/reply_comment3.py" beforeDir="false" afterPath="$PROJECT_DIR$/reply_comment3.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -18,26 +20,26 @@
<counts>
<entry key="README" value="1" />
<entry key="batch_user_gen" value="1" />
<entry key="py" value="38" />
<entry key="py" value="45" />
<entry key="txt" value="3" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="PLAIN_TEXT" value="5" />
<entry key="Python" value="38" />
<entry key="Python" value="45" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="dummy" value="1" />
<entry key="py" value="1928" />
<entry key="py" value="2007" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="1" />
<entry key="Python" value="1928" />
<entry key="Python" value="2007" />
</counts>
</usages-collector>
<usages-collector id="statistics.lifecycle.project">
......@@ -51,105 +53,85 @@
</session>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="219">
<caret line="52" column="22" selection-start-line="52" selection-start-column="22" selection-end-line="52" selection-end-column="22" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<marker date="1563777222000" expanded="true" signature="1500:1502" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/batch_user_gen">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index_contrast/tag.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1633">
<caret line="321" column="29" lean-forward="true" selection-start-line="321" selection-start-column="29" selection-end-line="321" selection-end-column="29" />
<folding>
<element signature="e#46#55#0" expanded="true" />
<element signature="e#495#925#0" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index_contrast/user.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="439">
<caret line="314" column="40" lean-forward="true" selection-start-line="314" selection-start-column="40" selection-end-line="314" selection-end-column="40" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index_contrast/pictorial.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<caret line="194" column="67" selection-start-line="194" selection-start-column="67" selection-end-line="194" selection-end-column="67" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/answer_reply1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="29" selection-start-line="7" selection-start-column="14" selection-end-line="7" selection-end-column="29" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/.local/lib/python3.6/site-packages/requests/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow2.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
<splitter split-orientation="horizontal" split-proportion="0.3965245">
<split-first>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/answer_reply1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="692">
<caret line="79" column="74" lean-forward="true" selection-start-line="79" selection-start-column="20" selection-end-line="79" selection-end-column="74" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-first>
<split-second>
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/answer_reply2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="764">
<caret line="52" column="43" lean-forward="true" selection-start-line="52" selection-start-column="43" selection-end-line="52" selection-end-column="43" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/reply_comment1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/reply_comment2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/answer_reply3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="466">
<caret line="48" column="51" lean-forward="true" selection-start-line="48" selection-start-column="51" selection-end-line="48" selection-end-column="51" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/reply_comment3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-second>
</splitter>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
......@@ -184,24 +166,25 @@
<option value="$PROJECT_DIR$/answer2.txt" />
<option value="$PROJECT_DIR$/answer1.txt" />
<option value="$PROJECT_DIR$/answer_reply.py" />
<option value="$PROJECT_DIR$/answer_reply3.py" />
<option value="$PROJECT_DIR$/answer_reply2.py" />
<option value="$PROJECT_DIR$/reply_comment2.py" />
<option value="$PROJECT_DIR$/reply_comment3.py" />
<option value="$PROJECT_DIR$/reply_comment1.py" />
<option value="$PROJECT_DIR$/test.py" />
<option value="$PROJECT_DIR$/index_contrast/tag.py" />
<option value="$PROJECT_DIR$/index_contrast/user.py" />
<option value="$PROJECT_DIR$/index_contrast/pictorial.py" />
<option value="$PROJECT_DIR$/answer_reply1.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/answer_reply1.py" />
<option value="$PROJECT_DIR$/reply_comment2.py" />
<option value="$PROJECT_DIR$/answer_reply3.py" />
<option value="$PROJECT_DIR$/answer_reply2.py" />
<option value="$PROJECT_DIR$/reply_comment3.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="y" value="23" />
<option name="width" value="1280" />
<option name="height" value="727" />
<option name="x" value="-323" />
<option name="y" value="-1080" />
<option name="width" value="1920" />
<option name="height" value="1080" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
......@@ -282,12 +265,12 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1280" height="727" extended-state="6" />
<frame x="-323" y="-1080" width="1920" height="1080" extended-state="6" />
<editor active="true" />
<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 active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.15329626" />
<window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.1348078" />
<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.3284974" />
......@@ -297,7 +280,7 @@
<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 anchor="bottom" id="Terminal" order="8" sideWeight="0.49960285" visible="true" weight="0.0" />
<window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49960285" visible="true" weight="0.05595855" />
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50039715" side_tool="true" weight="0.32890365" />
<window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="bottom" id="DB Execution Console" order="11" />
......@@ -493,44 +476,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="11" lean-forward="true" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="51" selection-start-line="10" selection-start-column="51" selection-end-line="10" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="247">
<caret line="52" column="54" lean-forward="true" selection-start-line="52" selection-start-column="54" selection-end-line="52" selection-end-column="54" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="39">
<caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_comment_51.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
......@@ -610,23 +558,73 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="29" selection-start-line="7" selection-start-column="14" selection-end-line="7" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/batch_user_gen">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="219">
<caret line="52" column="22" selection-start-line="52" selection-start-column="22" selection-end-line="52" selection-end-column="22" />
<state relative-caret-position="69">
<caret line="64" column="4" selection-start-line="64" selection-start-column="4" selection-end-line="64" selection-end-column="4" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<marker date="1563777222000" expanded="true" signature="1500:1502" ph="..." />
<marker date="1563777637000" expanded="true" signature="1533:1535" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="764">
<caret line="52" column="43" lean-forward="true" selection-start-line="52" selection-start-column="43" selection-end-line="52" selection-end-column="43" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="466">
<caret line="48" column="51" lean-forward="true" selection-start-line="48" selection-start-column="51" selection-end-line="48" selection-end-column="51" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="692">
<caret line="79" column="74" lean-forward="true" selection-start-line="79" selection-start-column="20" selection-end-line="79" selection-end-column="74" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
......
......@@ -3,7 +3,8 @@ import traceback
import logging
import json
from log_settings import *
from auto_request import login, reply, get_comment, time_conv, get_answer_data, reply_answer, set_reply_to_redis
from auto_request import logins, reply, get_comment, time_conv, get_answer_data, reply_answer, get_majia, \
set_reply_to_redis
from auto_request import host, user, db, passwd
......@@ -49,7 +50,8 @@ if __name__ == "__main__":
reply_data_comment = []
if user_id:
for i in user_id:
cook = login()
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment1, comment2 = get_answer_data()
if cook is not None:
response = reply_answer(cook, i[1], comment1)
......@@ -58,11 +60,11 @@ if __name__ == "__main__":
reply_id = data_dict["data"]["id"]
reply_user_id = data_dict["data"]["user"]["id"]
reply_data_comment.append(
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]})
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1],
"majia_user_id": majia_user_id})
redis_client = set_reply_to_redis()
redis_client.set(redis_key, json.dumps(reply_data_comment))
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
......@@ -3,7 +3,8 @@ import traceback
import logging
import json
from log_settings import *
from auto_request import login, reply, get_comment, time_conv, get_answer_data, reply_answer, set_reply_to_redis
from auto_request import logins, reply, get_comment, time_conv, get_answer_data, reply_answer, set_reply_to_redis, \
get_majia
from auto_request import host, user, db, passwd
......@@ -49,7 +50,8 @@ if __name__ == "__main__":
reply_data_comment = []
if user_id:
for i in user_id:
cook = login()
majia_user_id = get_majia()
cook = logins(majia_user_id)
comment1, comment2 = get_answer_data()
if cook is not None:
response = reply_answer(cook, i[1], comment1)
......@@ -58,7 +60,8 @@ if __name__ == "__main__":
reply_id = data_dict["data"]["id"]
reply_user_id = data_dict["data"]["user"]["id"]
reply_data_comment.append(
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]})
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1],
"majia_user_id": majia_user_id})
redis_client = set_reply_to_redis()
redis_client.set(redis_key1, json.dumps(reply_data_comment))
......
......@@ -3,7 +3,7 @@ import redis
import logging
import json
from log_settings import *
from auto_request import set_reply_to_redis, reply2, login
from auto_request import set_reply_to_redis, reply2, logins, get_majia_reply
if __name__ == "__main__":
......@@ -14,7 +14,8 @@ if __name__ == "__main__":
result = json.loads(str(have_reply1, encoding="utf-8"))
if result:
for item in result:
cook = login()
majia_user_id = get_majia_reply(item["majia_user_id"])
cook = logins(majia_user_id)
reply2(cook, item["topic_id"], item["answer"], item["id"])
redis_client.delete(redis_key1)
except:
......
......@@ -3,7 +3,7 @@ import redis
import logging
import json
from log_settings import *
from auto_request import set_reply_to_redis, reply2, login
from auto_request import set_reply_to_redis, reply2, logins,get_majia_reply
if __name__ == "__main__":
......@@ -14,7 +14,8 @@ if __name__ == "__main__":
result = json.loads(str(have_reply1, encoding="utf-8"))
if result:
for item in result:
cook = login()
majia_user_id = get_majia_reply(item["majia_user_id"])
cook = logins(majia_user_id)
reply2(cook, item["topic_id"], item["answer"], item["id"])
redis_client.delete(redis_key1)
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