Commit 7411a8d9 authored by lixiaofang's avatar lixiaofang

add

parent d8649ae6
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/instant.py" beforeDir="false" afterPath="$PROJECT_DIR$/instant.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/instant.py" beforeDir="false" afterPath="$PROJECT_DIR$/instant.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
...@@ -42,14 +43,14 @@ ...@@ -42,14 +43,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="3114" /> <entry key="py" value="3172" />
<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="3114" /> <entry key="Python" value="3172" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -132,8 +133,8 @@ ...@@ -132,8 +133,8 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/instant.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="352"> <state relative-caret-position="561">
<caret line="24" column="58" lean-forward="true" selection-start-line="24" selection-start-column="58" selection-end-line="24" selection-end-column="58" /> <caret line="42" column="16" selection-start-line="42" selection-start-column="16" selection-end-line="42" selection-end-column="16" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -185,8 +186,8 @@ ...@@ -185,8 +186,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="-976"> <state relative-caret-position="257">
<caret line="32" selection-start-line="32" selection-end-line="40" selection-end-column="41" /> <caret line="95" column="4" selection-start-line="95" selection-start-column="4" selection-end-line="95" selection-end-column="4" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -516,7 +517,7 @@ ...@@ -516,7 +517,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.21450777" /> <window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.17512953" />
<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" />
...@@ -893,16 +894,6 @@ ...@@ -893,16 +894,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="-976">
<caret line="32" selection-start-line="32" selection-end-line="40" selection-end-column="41" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_click.py"> <entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="480"> <state relative-caret-position="480">
...@@ -933,10 +924,20 @@ ...@@ -933,10 +924,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="257">
<caret line="95" column="4" selection-start-line="95" selection-start-column="4" selection-end-line="95" selection-end-column="4" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/instant.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="352"> <state relative-caret-position="561">
<caret line="24" column="58" lean-forward="true" selection-start-line="24" selection-start-column="58" selection-end-line="24" selection-end-column="58" /> <caret line="42" column="16" selection-start-line="42" selection-start-column="16" selection-end-line="42" selection-end-column="16" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
......
...@@ -7,47 +7,48 @@ import pandas as pd ...@@ -7,47 +7,48 @@ import pandas as pd
import traceback import traceback
from log_settings import * from log_settings import *
import logging import logging
from auto_request import get_offline_comment,login,click from auto_request import get_offline_comment, login, click
import threading import threading
from auto_request import host, user, db, passwd from auto_request import host, user, db, passwd
if __name__ == "__main__": if __name__ == "__main__":
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 id,user_id FROM topic WHERE id = "+str(927745)+" and user_id in (select user_id from user_extra where is_shadow = 0)") "SELECT id,user_id FROM topic WHERE id = " + str(
927745) + " and user_id in (select user_id from user_extra where is_shadow = 0)")
data = cursor.fetchall() data = cursor.fetchall()
topic_id_list = list(data) topic_id_list = list(data)
logging.info("Database version : %s " % topic_id_list) logging.info("Database version : %s " % topic_id_list)
pc.close() pc.close()
topic_id_list = [919337,927745] topic_id_list = 919337
if topic_id_list: if topic_id_list:
def fun_timer(): def fun_timer():
for id in topic_id_list:
cookies = login() cookies = login()
if cookies:
click(cookies, id) if cookies:
click(cookies, id)
global timer global timer
timer = threading.Timer(3, fun_timer) timer = threading.Timer(60, fun_timer)
timer.start() timer.start()
# timer = threading.Timer(4, fun_timer) # timer = threading.Timer(4, fun_timer)
# timer.start() # timer.start()
# timer = threading.Timer(5, fun_timer) # timer = threading.Timer(5, fun_timer)
# timer.start() # timer.start()
timer = threading.Timer(1, fun_timer) # 首次启动 timer = threading.Timer(1, fun_timer) # 首次启动
timer.start() timer.start()
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
\ No newline at end of file
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