Commit 55a22f9d authored by lixiaofang's avatar lixiaofang

add

parent a984ae7a
......@@ -2,11 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7b835479-ee84-40d6-9b97-0e9285d92119" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/answer1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/answer2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/answer_reply.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/reply_comment1.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/评论500条.xlsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_request.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_request.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
......@@ -42,14 +37,15 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="232">
<caret line="414" column="4" selection-start-line="414" selection-start-column="4" selection-end-line="414" selection-end-column="4" />
<state relative-caret-position="183">
<caret line="308" column="53" selection-start-line="308" selection-start-column="46" selection-end-line="308" selection-end-column="53" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<marker date="1562827953000" expanded="true" signature="10054:10059" ph="..." />
<element signature="e#7772#8468#0" />
<marker date="1562828703000" expanded="true" signature="10072:10077" ph="..." />
</folding>
</state>
</provider>
......@@ -58,8 +54,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/answer_reply.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="307">
<caret line="61" column="84" selection-start-line="61" selection-start-column="78" selection-end-line="61" selection-end-column="84" />
<state relative-caret-position="382">
<caret line="66" column="22" lean-forward="true" selection-start-line="66" selection-start-column="22" selection-end-line="66" selection-end-column="22" />
<folding>
<element signature="e#1#15#0" expanded="true" />
</folding>
......@@ -67,11 +63,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<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="405">
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
<state relative-caret-position="225">
<caret line="15" column="23" lean-forward="true" selection-start-line="15" selection-start-column="23" selection-end-line="15" selection-end-column="23" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
......@@ -132,9 +128,9 @@
<list>
<option value="$PROJECT_DIR$/answer2.txt" />
<option value="$PROJECT_DIR$/answer1.txt" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/answer_reply.py" />
<option value="$PROJECT_DIR$/reply_comment1.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
</list>
</option>
</component>
......@@ -221,7 +217,7 @@
<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.0" />
<window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.0" />
<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" />
......@@ -231,8 +227,8 @@
<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" visible="true" weight="0.0" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" sideWeight="0.49960285" visible="true" weight="0.0" />
<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" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
......@@ -433,33 +429,34 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<entry file="file://$PROJECT_DIR$/answer_reply.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="232">
<caret line="414" column="4" selection-start-line="414" selection-start-column="4" selection-end-line="414" selection-end-column="4" />
<state relative-caret-position="382">
<caret line="66" column="22" lean-forward="true" selection-start-line="66" selection-start-column="22" selection-end-line="66" selection-end-column="22" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<marker date="1562827953000" expanded="true" signature="10054:10059" ph="..." />
<element signature="e#1#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply.py">
<entry file="file://$PROJECT_DIR$/reply_comment1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="307">
<caret line="61" column="84" selection-start-line="61" selection-start-column="78" selection-end-line="61" selection-end-column="84" />
<state relative-caret-position="225">
<caret line="15" column="23" lean-forward="true" selection-start-line="15" selection-start-column="23" selection-end-line="15" selection-end-column="23" />
<folding>
<element signature="e#1#15#0" expanded="true" />
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/reply_comment1.py">
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
<state relative-caret-position="183">
<caret line="308" column="53" selection-start-line="308" selection-start-column="46" selection-end-line="308" selection-end-column="53" />
<folding>
<element signature="e#0#16#0" expanded="true" />
<element signature="e#0#15#0" expanded="true" />
<element signature="e#7772#8468#0" />
<marker date="1562828703000" expanded="true" signature="10072:10077" ph="..." />
</folding>
</state>
</provider>
......
......@@ -10,36 +10,15 @@ import redis
import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
from collections import Counter
auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
my_sender = 'lixiaofang@igengmei.com'
my_pass = 'tg5AVKBB8jLQGBET'
my_user6 = "lixiaofang@igengmei.com"
# auto_click_url = "http://earth.igengmei.env/api/v1/like"
# auto_reply_url = "http://earth.igengmei.env/api/v1/reply/create"
# auto_follow_url = "http://earth.igengmei.env/api/v1/follow"
# auto_urge_url = "http://earth.igengmei.env/api/v1/user/urge"
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'alpha',
# 'USER': 'work',
# 'PASSWORD': 'Gengmei123!',
# 'HOST': '172.21.36.16',
# 'PORT': '3306',
# 'OPTIONS': {
# "init_command": "SET foreign_key_checks = 0;",
# "charset": "utf8mb4",
# },
# }
# }
auto_click_url = "http://earth.gmapp.env/api/v1/like"
auto_reply_url = "http://earth.gmapp.env/api/v1/reply/create"
auto_follow_url = "http://earth.gmapp.env/api/v1/follow"
auto_urge_url = "http://earth.gmapp.env/api/v1/user/urge"
DATABASES = {
......@@ -47,16 +26,17 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alpha',
'USER': 'work',
'PASSWORD': 'oars152!traipseize738',
'HOST': '172.17.40.136',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.16',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
}
},
}
}
host = DATABASES['default']['HOST']
user = DATABASES['default']['USER']
......@@ -356,7 +336,7 @@ def get_answer_data():
try:
# 获取第一条评论
data = open("answer1.txt", "r")
data = open("/srv/apps/cybertron/answer1.txt", "r")
answer_data1 = []
for i in data:
......@@ -400,8 +380,6 @@ def reply_answer(cookies_get, id, content):
logging.error("catch exception,logins:%s" % traceback.format_exc())
def set_reply_to_redis():
try:
redis_url = 'redis://127.0.0.1:6379/1'
......@@ -412,13 +390,13 @@ def set_reply_to_redis():
logging.error("catch exception,logins:%s" % traceback.format_exc())
def reply2(cookies_get, id, content,replied_id):
def reply2(cookies_get, id, content, replied_id):
try:
post_dict = {
'topic_id': id,
'content': content,
"type": 4,
"replied_id":replied_id
"replied_id": replied_id
}
response = requests.post(url=auto_reply_url,
cookies=cookies_get,
......
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