Commit a78a48b1 authored by lixiaofang's avatar lixiaofang

change daima

parent ccdd1f2f
...@@ -24,5 +24,29 @@ ...@@ -24,5 +24,29 @@
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" /> <option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings> </formatting-settings>
</DBN-SQL> </DBN-SQL>
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
</code_scheme> </code_scheme>
</component> </component>
\ No newline at end of file
...@@ -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/codeStyles/Project.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_at_once.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_at_once.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_at_once.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_at_once.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_click.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_click.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_click.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_click.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_click_n.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_click_n.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_click_n.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_click_n.py" afterDir="false" />
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<change beforePath="$PROJECT_DIR$/auto_star_urge.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_star_urge.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_star_urge.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_star_urge.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_urge.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_urge.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_urge_three.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge_three.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/auto_urge_three.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge_three.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test.py" beforeDir="false" afterPath="$PROJECT_DIR$/test.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/guanshui" beforeDir="false" afterPath="$PROJECT_DIR$/guanshui" afterDir="false" />
</list> </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" />
...@@ -30,36 +31,37 @@ ...@@ -30,36 +31,37 @@
<counts> <counts>
<entry key="project.closed" value="2" /> <entry key="project.closed" value="2" />
<entry key="project.open.time.0" value="1" /> <entry key="project.open.time.0" value="1" />
<entry key="project.open.time.2" value="1" /> <entry key="project.open.time.2" value="2" />
<entry key="project.open.time.5" value="1" /> <entry key="project.open.time.5" value="1" />
<entry key="project.opened" value="3" /> <entry key="project.opened" value="4" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.open"> <usages-collector id="statistics.file.extensions.open">
<counts> <counts>
<entry key="comment" value="2" /> <entry key="comment" value="2" />
<entry key="guanshui" value="1" /> <entry key="guanshui" value="2" />
<entry key="py" value="43" /> <entry key="py" value="47" />
<entry key="xuqiu" value="2" /> <entry key="xuqiu" value="2" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.open"> <usages-collector id="statistics.file.types.open">
<counts> <counts>
<entry key="PLAIN_TEXT" value="5" /> <entry key="PLAIN_TEXT" value="6" />
<entry key="Python" value="43" /> <entry key="Python" value="47" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.edit"> <usages-collector id="statistics.file.extensions.edit">
<counts> <counts>
<entry key="comment" value="59" /> <entry key="comment" value="59" />
<entry key="py" value="780" /> <entry key="guanshui" value="2" />
<entry key="py" value="858" />
<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="282" /> <entry key="PLAIN_TEXT" value="284" />
<entry key="Python" value="780" /> <entry key="Python" value="858" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -127,11 +129,11 @@ ...@@ -127,11 +129,11 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_at_once.py"> <entry file="file://$PROJECT_DIR$/auto_lunch_app.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="419">
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" /> <caret line="125" column="17" lean-forward="true" selection-start-line="125" selection-start-column="17" selection-end-line="125" selection-end-column="17" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -140,10 +142,10 @@ ...@@ -140,10 +142,10 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click.py"> <entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="2955">
<caret line="9" column="38" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" /> <caret line="197" column="73" selection-start-line="197" selection-start-column="73" selection-end-line="197" selection-end-column="73" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -152,10 +154,10 @@ ...@@ -152,10 +154,10 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_lunch_app.py"> <entry file="file://$PROJECT_DIR$/auto_star_urge.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="494">
<caret line="10" column="39" selection-start-line="10" selection-start-column="39" selection-end-line="10" selection-end-column="39" /> <caret line="145" lean-forward="true" selection-start-line="145" selection-end-line="145" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -164,10 +166,10 @@ ...@@ -164,10 +166,10 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow_one.py"> <entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="524">
<caret line="9" column="39" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" /> <caret line="146" selection-start-line="146" selection-end-line="146" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -176,10 +178,10 @@ ...@@ -176,10 +178,10 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow.py"> <entry file="file://$PROJECT_DIR$/auto_urge_three.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="494">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" /> <caret line="135" column="73" selection-start-line="135" selection-start-column="73" selection-end-line="135" selection-end-column="73" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -187,32 +189,32 @@ ...@@ -187,32 +189,32 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_every_day.py"> <entry file="file://$PROJECT_DIR$/guanshui">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180"> <state relative-caret-position="554">
<caret line="12" column="37" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" /> <caret line="60" lean-forward="true" selection-start-line="60" selection-end-line="60" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_commnet.py"> <entry file="file://$PROJECT_DIR$/auto_follow_one.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30"> <state relative-caret-position="509">
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" /> <caret line="133" column="11" lean-forward="true" selection-start-line="133" selection-start-column="11" selection-end-line="133" selection-end-column="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click_n.py"> <entry file="file://$PROJECT_DIR$/auto_follow.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="554">
<caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" /> <caret line="144" lean-forward="true" selection-start-line="144" selection-end-line="144" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -223,8 +225,11 @@ ...@@ -223,8 +225,11 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_follow_new.py"> <entry file="file://$PROJECT_DIR$/auto_follow_new.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15"> <state relative-caret-position="389">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" /> <caret line="176" column="35" selection-start-line="176" selection-start-column="35" selection-end-line="176" selection-end-column="35" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -232,8 +237,8 @@ ...@@ -232,8 +237,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<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="45"> <state relative-caret-position="105">
<caret line="11" column="39" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" /> <caret line="7" column="13" lean-forward="true" selection-start-line="7" selection-end-line="8" />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -287,31 +292,30 @@ ...@@ -287,31 +292,30 @@
<option value="$PROJECT_DIR$/user_session" /> <option value="$PROJECT_DIR$/user_session" />
<option value="$PROJECT_DIR$/user_session.json" /> <option value="$PROJECT_DIR$/user_session.json" />
<option value="$PROJECT_DIR$/auto_click_ssss.py" /> <option value="$PROJECT_DIR$/auto_click_ssss.py" />
<option value="$PROJECT_DIR$/guanshui" />
<option value="$PROJECT_DIR$/batch_user_gen" /> <option value="$PROJECT_DIR$/batch_user_gen" />
<option value="$PROJECT_DIR$/test.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" /> <option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_click_n.py" /> <option value="$PROJECT_DIR$/auto_click_n.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" /> <option value="$PROJECT_DIR$/auto_commnet.py" />
<option value="$PROJECT_DIR$/auto_every_day.py" /> <option value="$PROJECT_DIR$/auto_every_day.py" />
<option value="$PROJECT_DIR$/auto_follow.py" />
<option value="$PROJECT_DIR$/auto_follow_majia.py" /> <option value="$PROJECT_DIR$/auto_follow_majia.py" />
<option value="$PROJECT_DIR$/auto_follow_new.py" /> <option value="$PROJECT_DIR$/auto_follow_new.py" />
<option value="$PROJECT_DIR$/auto_lunch_app.py" />
<option value="$PROJECT_DIR$/auto_follow_one.py" /> <option value="$PROJECT_DIR$/auto_follow_one.py" />
<option value="$PROJECT_DIR$/auto_follow.py" />
<option value="$PROJECT_DIR$/auto_lunch_app.py" />
<option value="$PROJECT_DIR$/auto_star_topic.py" /> <option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_star_urge.py" /> <option value="$PROJECT_DIR$/auto_star_urge.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$/test.py" /> <option value="$PROJECT_DIR$/guanshui" />
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-309" /> <option name="y" value="23" />
<option name="y" value="-1080" /> <option name="width" value="1280" />
<option name="width" value="1920" /> <option name="height" value="724" />
<option name="height" value="1080" />
</component> </component>
<component name="ProjectView"> <component name="ProjectView">
<navigator proportions="" version="1"> <navigator proportions="" version="1">
...@@ -519,14 +523,13 @@ ...@@ -519,14 +523,13 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-309" y="-1080" width="1920" height="1080" extended-state="6" /> <frame x="0" y="23" width="1280" height="724" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="DB Browser" />
<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 active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.19010006" /> <window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.2867355" />
<window_info anchor="bottom" id="DB Execution Console" /> <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.32909092" /> <window_info anchor="bottom" id="Find" order="1" weight="0.32909092" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.46830985" /> <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.46830985" />
...@@ -535,9 +538,10 @@ ...@@ -535,9 +538,10 @@
<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 anchor="bottom" id="Terminal" order="8" visible="true" weight="0.07772021" /> <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 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="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
...@@ -638,13 +642,6 @@ ...@@ -638,13 +642,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/guanshui">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3915">
<caret line="261" column="6" lean-forward="true" selection-start-line="261" selection-start-column="6" selection-end-line="261" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/log_settings.py"> <entry file="file://$PROJECT_DIR$/log_settings.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420"> <state relative-caret-position="420">
...@@ -662,136 +659,143 @@ ...@@ -662,136 +659,143 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_urge_three.py"> <entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="2775">
<caret line="9" column="37" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" /> <caret line="185" column="73" selection-start-line="185" selection-start-column="73" selection-end-line="185" selection-end-column="73" />
<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$/auto_urge.py"> <entry file="file://$PROJECT_DIR$/auto_click_n.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="-1786">
<caret line="9" column="37" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" /> <caret line="6" selection-start-line="6" selection-end-line="6" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_star_urge.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="135"> <state relative-caret-position="554">
<caret line="9" column="37" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" /> <caret line="156" lean-forward="true" selection-start-line="156" selection-end-line="156" />
<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$/auto_star_topic.py"> <entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="127"> <state relative-caret-position="90">
<caret line="11" column="38" selection-start-line="11" selection-start-column="38" selection-end-line="11" selection-end-column="38" /> <caret line="6" selection-start-line="6" selection-end-line="6" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_lunch_app.py"> <entry file="file://$PROJECT_DIR$/auto_every_day.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="554">
<caret line="10" column="39" selection-start-line="10" selection-start-column="39" selection-end-line="10" selection-end-column="39" /> <caret line="152" lean-forward="true" selection-start-line="152" selection-end-line="152" />
<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$/auto_follow_one.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="135"> <state relative-caret-position="105">
<caret line="9" column="39" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" /> <caret line="7" column="13" lean-forward="true" selection-start-line="7" selection-end-line="8" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_follow_new.py"> <entry file="file://$PROJECT_DIR$/auto_follow_new.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15"> <state relative-caret-position="389">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" /> <caret line="176" column="35" selection-start-line="176" selection-start-column="35" selection-end-line="176" selection-end-column="35" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py"> <entry file="file://$PROJECT_DIR$/auto_follow_one.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45"> <state relative-caret-position="509">
<caret line="11" column="39" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" /> <caret line="133" column="11" lean-forward="true" selection-start-line="133" selection-start-column="11" selection-end-line="133" selection-end-column="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_follow.py"> <entry file="file://$PROJECT_DIR$/auto_follow.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="554">
<caret line="8" column="39" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" /> <caret line="144" lean-forward="true" selection-start-line="144" selection-end-line="144" />
<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$/auto_every_day.py"> <entry file="file://$PROJECT_DIR$/auto_lunch_app.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180"> <state relative-caret-position="419">
<caret line="12" column="37" selection-start-line="12" selection-start-column="37" selection-end-line="12" selection-end-column="37" /> <caret line="125" column="17" lean-forward="true" selection-start-line="125" selection-start-column="17" selection-end-line="125" selection-end-column="17" />
<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$/auto_commnet.py"> <entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30"> <state relative-caret-position="2955">
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" /> <caret line="197" column="73" selection-start-line="197" selection-start-column="73" selection-end-line="197" selection-end-column="73" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_click_n.py"> <entry file="file://$PROJECT_DIR$/auto_star_urge.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="494">
<caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" /> <caret line="145" lean-forward="true" selection-start-line="145" selection-end-line="145" />
<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$/auto_click.py"> <entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="524">
<caret line="9" column="38" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" /> <caret line="146" selection-start-line="146" selection-end-line="146" />
<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$/auto_at_once.py"> <entry file="file://$PROJECT_DIR$/auto_urge_three.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="494">
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" /> <caret line="135" column="73" selection-start-line="135" selection-start-column="73" selection-end-line="135" selection-end-column="73" />
<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$/guanshui">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="554">
<caret line="60" lean-forward="true" selection-start-line="60" selection-end-line="60" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -13,31 +13,24 @@ auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create" ...@@ -13,31 +13,24 @@ auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list = []
list=[]
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1, len(list))
maj = random.randint(1,len(list)) user_id = list[maj - 1]
user_id=list[maj-1]
return user_id return user_id
except: except:
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -50,21 +43,19 @@ def get_cookies(user_id): ...@@ -50,21 +43,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def login():
def login():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -73,8 +64,8 @@ def login(): ...@@ -73,8 +64,8 @@ def login():
return None return None
def click(cookies_get, id):
def click(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 0, 'type': 0,
...@@ -90,16 +81,16 @@ def click(cookies_get, id): ...@@ -90,16 +81,16 @@ def click(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def reply(cookies_get,id,content):
def reply(cookies_get, id, content):
try: try:
post_dict={ post_dict = {
'topic_id':id, 'topic_id': id,
'content':content 'content': content
} }
response=requests.post(url=auto_reply_url, response = requests.post(url=auto_reply_url,
cookies=cookies_get, cookies=cookies_get,
data=post_dict) data=post_dict)
logging.info("response.text:%s" % response.text) logging.info("response.text:%s" % response.text)
...@@ -107,6 +98,7 @@ def reply(cookies_get,id,content): ...@@ -107,6 +98,7 @@ def reply(cookies_get,id,content):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(): def time_conv():
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -117,12 +109,15 @@ def time_conv(): ...@@ -117,12 +109,15 @@ def time_conv():
except: except:
return None return None
def get_topic_id(numtime): def get_topic_id(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', passwd='oars152!traipseize738', db = pymysql.connect(host="172.17.40.144", user='work', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("SELECT id FROM topic WHERE is_online =1 and create_time >= %s" ,(numtime)) cursor.execute(
"SELECT id,user_id FROM topic WHERE is_online =1 and create_time >= %s and user_id in (select user_id from user_extra where is_shadow = 0)",
(numtime))
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -132,16 +127,15 @@ def get_topic_id(numtime): ...@@ -132,16 +127,15 @@ def get_topic_id(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
def get_comment(): def get_comment():
try: try:
data = pd.read_csv("guanshui", sep='\n') data = open("/srv/apps/cybertron/guanshui", "r")
num = random.randint(0, len(data))
list_guanshui = [] list_guanshui = []
for i in data['comment scene']: for i in data:
l = i.split('\t') list_guanshui.append(i)
list_guanshui.append(l[0]) num = random.randint(0, len(list_guanshui))
comment = list_guanshui[num - 1]
comment = list_guanshui[num-1]
return comment return comment
...@@ -149,41 +143,44 @@ def get_comment(): ...@@ -149,41 +143,44 @@ def get_comment():
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
numtime=time_conv() numtime = time_conv()
topic_id = get_topic_id(numtime) topic_id = get_topic_id(numtime)
click_num = random.randint(1, 3)
for j in topic_id: for i in range(click_num):
for j in topic_id:
id = int(j[0]) id = int(j[0])
click_num = random.randint(1,5)
for i in range(click_num):
cookies = login() cookies = login()
time.sleep(random.randint(1, 10))
click(cookies, id) click(cookies, id)
time.sleep(300)
topic_id = get_topic_id(numtime) topic_id = get_topic_id(numtime)
for j in topic_id: comment_num = random.randint(1, 3)
id = int(j[0]) for i in range(comment_num):
comment_num = random.randint(1, 3) for j in topic_id:
for i in range(comment_num): id = int(j[0])
cookies= login() cookies = login()
if cookies is not None: if cookies is not None:
comment = get_comment() comment = get_comment()
time.sleep(random.randint(1, 10))
reply(cookies, id, comment) reply(cookies, id, comment)
time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -9,19 +9,19 @@ import logging ...@@ -9,19 +9,19 @@ import logging
auto_click_url = "http://earth.iyanzhi.com/api/v1/like" auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
def get_majia():
def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -29,10 +29,10 @@ def get_majia(): ...@@ -29,10 +29,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -45,21 +45,19 @@ def get_cookies(user_id): ...@@ -45,21 +45,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def login():
def login():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -68,8 +66,8 @@ def login(): ...@@ -68,8 +66,8 @@ def login():
return None return None
def click(cookies_get, id):
def click(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 0, 'type': 0,
...@@ -85,6 +83,7 @@ def click(cookies_get, id): ...@@ -85,6 +83,7 @@ def click(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime): def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -94,13 +93,15 @@ def time_conv(numtime): ...@@ -94,13 +93,15 @@ def time_conv(numtime):
except: except:
return None return None
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime) cursor.execute(
"SELECT distinct(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)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -110,11 +111,12 @@ def get_data(numtime): ...@@ -110,11 +111,12 @@ def get_data(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
time_list = [1,2,3,4,5,6,7] time_list = [1, 2, 3, 4, 5, 6, 7]
for i in time_list: for i in time_list:
...@@ -122,39 +124,33 @@ if __name__ == "__main__": ...@@ -122,39 +124,33 @@ if __name__ == "__main__":
user_id = get_data(numtime) user_id = get_data(numtime)
dict = {} dicts = {}
for i in user_id: for i in user_id:
if i[0] not in dict.keys(): if i[0] not in dicts.keys():
dict.setdefault(i[0], []) dicts.setdefault(i[0], [])
dict[i[0]].append(i[1]) dicts[i[0]].append(i[1])
else: else:
dict[i[0]].append(i[1]) dicts[i[0]].append(i[1])
print(dicts)
for key, value in dicts.items():
for key,value in dict.items(): rand_num = random.randint(0, len(value) - 1)
rand_num = random.randint(0,len(value)-1) rand_id = value[rand_num]
rand_id = value[rand_num]
urge_num = random.randint(0, 1) urge_num = random.randint(0, 1)
for i in range(urge_num): for i in range(urge_num):
# time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cook=login() cook = login()
if cook is not None: if cook is not None:
click(cook, rand_id) click(cook, rand_id)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -4,23 +4,23 @@ import datetime ...@@ -4,23 +4,23 @@ import datetime
import pymysql import pymysql
import random import random
import traceback import traceback
from log_settings import *
import logging import logging
auto_click_url = "http://earth.iyanzhi.com/api/v1/like" auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
def get_majia():
def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -28,10 +28,10 @@ def get_majia(): ...@@ -28,10 +28,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -44,21 +44,19 @@ def get_cookies(user_id): ...@@ -44,21 +44,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -67,8 +65,8 @@ def logins(): ...@@ -67,8 +65,8 @@ def logins():
return None return None
def click(cookies_get, id):
def click(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 0, 'type': 0,
...@@ -84,6 +82,7 @@ def click(cookies_get, id): ...@@ -84,6 +82,7 @@ def click(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime): def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -93,14 +92,16 @@ def time_conv(numtime): ...@@ -93,14 +92,16 @@ def time_conv(numtime):
except: except:
return None return None
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
print("---------") print("---------")
cursor.execute("SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime) cursor.execute(
"SELECT distinct(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)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -110,15 +111,16 @@ def get_data(numtime): ...@@ -110,15 +111,16 @@ def get_data(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
time_list = [1,2,3,4,5,6,7] time_list = [1, 2, 3, 4, 5, 6, 7]
for i in time_list: for i in time_list:
numtime = time_conv(7+3*i) numtime = time_conv(7 + 3 * i)
user_id = get_data(numtime) user_id = get_data(numtime)
...@@ -135,23 +137,22 @@ if __name__ == "__main__": ...@@ -135,23 +137,22 @@ if __name__ == "__main__":
else: else:
dict[i[0]].append(i[1]) dict[i[0]].append(i[1])
for key,value in dict.items(): for key, value in dict.items():
rand_num = random.randint(0,len(value)-1) rand_num = random.randint(0, len(value) - 1)
rand_id = value[rand_num] rand_id = value[rand_num]
urge_num = random.randint(0, 1) urge_num = random.randint(0, 1)
for i in range(urge_num): for i in range(urge_num):
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cook=logins() cook = logins()
if cook is not None: if cook is not None:
click(cook, rand_id) click(cook, rand_id)
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
...@@ -3,27 +3,24 @@ import time ...@@ -3,27 +3,24 @@ import time
import datetime import datetime
import pymysql import pymysql
import random import random
import pandas as pd
import traceback import traceback
from log_settings import *
import logging import logging
auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create" auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen.txt")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -31,10 +28,10 @@ def get_majia(): ...@@ -31,10 +28,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -47,21 +44,19 @@ def get_cookies(user_id): ...@@ -47,21 +44,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -70,65 +65,67 @@ def logins(): ...@@ -70,65 +65,67 @@ def logins():
return None return None
def reply(cookies_get,id,content):
try : def reply(cookies_get, id, content):
post_dict={ try:
'topic_id':id, post_dict = {
'content':content 'topic_id': id,
'content': content
} }
response=requests.post(url=auto_reply_url, response = requests.post(url=auto_reply_url,
cookies=cookies_get, cookies=cookies_get,
data=post_dict) data=post_dict)
logging.info("response.text :%s"%(response.text)) logging.info("response.text :%s" % (response.text))
except: except:
logging.error("catch exception,reply:%s" % traceback.format_exc()) logging.error("catch exception,reply:%s" % traceback.format_exc())
def time_conv(numtime):
def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now -datetime.timedelta(days=numtime) yes_time = now - datetime.timedelta(days=numtime)
yes_time_str=yes_time.strftime('%Y-%m-%d') yes_time_str = yes_time.strftime('%Y-%m-%d')
return yes_time_str return yes_time_str
except: except:
return None return None
def get_topic_id(numtime): def get_topic_id(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("SELECT id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' " %numtime) cursor.execute(
"SELECT distinct(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)
data = cursor.fetchall() data = cursor.fetchall()
topic_id = list(data) topic_id = list(data)
logging.info("Database version : %s "%topic_id) logging.info("Database version : %s " % topic_id)
db.close() db.close()
return topic_id return topic_id
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
def get_comment(): def get_comment():
data = open("/srv/apps/cybertron/guanshui")
data = pd.read_csv("guanshui", sep='\n')
num = random.randint(0, len(data))
list_guanshui = [] list_guanshui = []
for i in data['comment scene']: for i in data:
l = i.split('\t') list_guanshui.append(i)
list_guanshui.append(l[0]) num = random.randint(0, len(list_guanshui))
comment = list_guanshui[num - 1]
comment = list_guanshui[num-1]
return comment return comment
if __name__ == "__main__": if __name__ == "__main__":
try: try:
time_list = [1,2,3,4,5,6,7] time_list = [1, 2, 3, 4, 5, 6, 7]
for i in time_list: for i in time_list:
...@@ -136,17 +133,34 @@ if __name__ == "__main__": ...@@ -136,17 +133,34 @@ if __name__ == "__main__":
topic_id = get_topic_id(numtime) topic_id = get_topic_id(numtime)
dicts = {}
for i in topic_id: for i in topic_id:
time.sleep(random.randint(10, 50)) if i[0] not in dicts.keys():
cook = logins() dicts.setdefault(i[0], [])
dicts[i[0]].append(i[1])
if cook is not None: else:
dicts[i[0]].append(i[1])
print(dicts)
for key, value in dicts.items():
rand_num = random.randint(0, len(value) - 1)
rand_id = value[rand_num]
time.sleep(random.randint(1, 10))
cook = logins()
if cook is not None:
comment = get_comment() comment = get_comment()
reply(cook, i, comment) reply(cook, rand_id, comment)
except: except:
......
...@@ -7,25 +7,23 @@ import traceback ...@@ -7,25 +7,23 @@ import traceback
from log_settings import * from log_settings import *
import logging import logging
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
auto_pick_url = "http://earth.iyanzhi.com/api/v1/pick/do_pick" auto_pick_url = "http://earth.iyanzhi.com/api/v1/pick/do_pick"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -33,10 +31,10 @@ def get_majia(): ...@@ -33,10 +31,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -49,21 +47,19 @@ def get_cookies(user_id): ...@@ -49,21 +47,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -72,8 +68,8 @@ def logins(): ...@@ -72,8 +68,8 @@ def logins():
return None return None
def follow(cookies_get, id):
def follow(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 1, 'type': 1,
...@@ -89,8 +85,8 @@ def follow(cookies_get, id): ...@@ -89,8 +85,8 @@ def follow(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime):
def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now - datetime.timedelta(days=numtime) yes_time = now - datetime.timedelta(days=numtime)
...@@ -99,16 +95,19 @@ def time_conv(numtime): ...@@ -99,16 +95,19 @@ def time_conv(numtime):
except: except:
return None return None
def get_topic_new_user(numtime): def get_topic_new_user(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("SELECT user_id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime) cursor.execute(
"SELECT distinct(user_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)
topic_data = cursor.fetchall() topic_data = cursor.fetchall()
cursor.execute("SELECT user_id FROM group_user_role WHERE create_time LIKE '%%%%%s%%%%'" % numtime) cursor.execute(
"SELECT distinct(user_id) FROM group_user_role WHERE create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
new_user_data = cursor.fetchall() new_user_data = cursor.fetchall()
topic_data = list(topic_data) topic_data = list(topic_data)
new_user_data = list(new_user_data) new_user_data = list(new_user_data)
...@@ -124,6 +123,7 @@ def get_topic_new_user(numtime): ...@@ -124,6 +123,7 @@ def get_topic_new_user(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
...@@ -131,29 +131,22 @@ if __name__ == "__main__": ...@@ -131,29 +131,22 @@ if __name__ == "__main__":
user_id = get_topic_new_user(numtime) user_id = get_topic_new_user(numtime)
for j in user_id: follow_num = random.randint(1, 2)
id = int(j[0]) for i in range(follow_num):
follow_num = random.randint(1,2) for j in user_id:
for i in range(follow_num): id = int(j[0])
time.sleep(random.randint(10, 50)) time.sleep(random.randint(10, 30))
cookies=logins() cookies = logins()
if cookies is not None: if cookies is not None:
follow(cookies, id) follow(cookies, id)
time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -11,7 +11,7 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" ...@@ -11,7 +11,7 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list=[]
...@@ -31,7 +31,7 @@ def get_majia(): ...@@ -31,7 +31,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -95,11 +95,11 @@ def time_conv(numtime): ...@@ -95,11 +95,11 @@ def time_conv(numtime):
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime) cursor.execute("SELECT distinct(user_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)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -123,15 +123,15 @@ if __name__ == "__main__": ...@@ -123,15 +123,15 @@ if __name__ == "__main__":
user_id = get_data(numtime) user_id = get_data(numtime)
for j in user_id: follow_num = random.randint(1,2)
id = int(j[0]) for i in range(follow_num):
follow_num = random.randint(1,2) for j in user_id:
for i in range(follow_num): id = int(j[0])
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1,10))
cookies=logins() cookies=logins()
...@@ -139,6 +139,7 @@ if __name__ == "__main__": ...@@ -139,6 +139,7 @@ if __name__ == "__main__":
follow(cookies, id) follow(cookies, id)
time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
......
...@@ -7,15 +7,15 @@ import pandas as pd ...@@ -7,15 +7,15 @@ import pandas as pd
import traceback import traceback
from log_settings import * from log_settings import *
import logging import logging
auto_click_url = "http://earth.iyanzhi.com/api/v1/like" auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create" auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -28,7 +28,6 @@ def get_cookies(user_id): ...@@ -28,7 +28,6 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
...@@ -36,12 +35,10 @@ def get_cookies(user_id): ...@@ -36,12 +35,10 @@ def get_cookies(user_id):
def logins(user_id): def logins(user_id):
try: try:
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -50,8 +47,8 @@ def logins(user_id): ...@@ -50,8 +47,8 @@ def logins(user_id):
return None return None
def follow(cookies_get, id):
def follow(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 1, 'type': 1,
...@@ -67,6 +64,7 @@ def follow(cookies_get, id): ...@@ -67,6 +64,7 @@ def follow(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(): def time_conv():
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -75,15 +73,18 @@ def time_conv(): ...@@ -75,15 +73,18 @@ def time_conv():
except: except:
return None return None
def get_follw_majia(numtime): def get_follw_majia(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("select temp1.user_id,temp1.email,temp2.user_id from account_user_auth temp1 left join (select user_id,follow_id,create_time from user_follow) temp2 on temp1.user_id = temp2.follow_id where temp1.email in ('s_05tmwu@shadow.com','s_07CRHt@shadow.com','s_0bdxxU@shadow.com','s_0mfxcO@shadow.com','s_0u6eaV@shadow.com','s_0UudEr@shadow.com','s_1b3v5V@shadow.com','s_ZVuLyC@shadow.com','s_1dbAoA@shadow.com','s_1dholX@shadow.com','s_1EpLlt@shadow.com') and temp2.create_time like '%%%%%s%%%%' "%(numtime)) cursor.execute(
"select temp1.user_id,temp1.email,temp2.user_id from account_user_auth temp1 left join (select user_id,follow_id,create_time from user_follow) temp2 on temp1.user_id = temp2.follow_id where temp1.email in ('s_05tmwu@shadow.com','s_07CRHt@shadow.com','s_0bdxxU@shadow.com','s_0mfxcO@shadow.com','s_0u6eaV@shadow.com','s_0UudEr@shadow.com','s_1b3v5V@shadow.com','s_ZVuLyC@shadow.com','s_1dbAoA@shadow.com','s_1dholX@shadow.com','s_1EpLlt@shadow.com') and temp2.create_time like '%%%%%s%%%%' " % (
numtime))
data = cursor.fetchall() data = cursor.fetchall()
data=list(data) data = list(data)
logging.info("Database version : %s " % data) logging.info("Database version : %s " % data)
db.close() db.close()
return data return data
...@@ -91,11 +92,12 @@ def get_follw_majia(numtime): ...@@ -91,11 +92,12 @@ def get_follw_majia(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
numtime=time_conv() numtime = time_conv()
# get majia zhanghao # get majia zhanghao
...@@ -137,22 +139,10 @@ if __name__ == "__main__": ...@@ -137,22 +139,10 @@ if __name__ == "__main__":
for i in value: for i in value:
cookies=logins(id) cookies = logins(id)
if cookies is not None: if cookies is not None:
follow(cookies, i)
follow(cookies,i)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -6,21 +6,22 @@ import random ...@@ -6,21 +6,22 @@ import random
import traceback import traceback
from log_settings import * from log_settings import *
import logging import logging
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_majia():
def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -28,10 +29,10 @@ def get_majia(): ...@@ -28,10 +29,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -44,21 +45,19 @@ def get_cookies(user_id): ...@@ -44,21 +45,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -67,8 +66,8 @@ def logins(): ...@@ -67,8 +66,8 @@ def logins():
return None return None
def follow(cookies_get, id):
def follow(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 1, 'type': 1,
...@@ -84,6 +83,7 @@ def follow(cookies_get, id): ...@@ -84,6 +83,7 @@ def follow(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime): def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -93,14 +93,15 @@ def time_conv(numtime): ...@@ -93,14 +93,15 @@ def time_conv(numtime):
except: except:
return None return None
def get_commnet_id(numtime): def get_commnet_id(numtime):
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute( cursor.execute(
"SELECT user_id FROM reply WHERE create_time LIKE '%%%%%s%%%%'" % numtime) "SELECT user_id FROM reply WHERE create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data_comment = cursor.fetchall() data_comment = cursor.fetchall()
...@@ -116,42 +117,40 @@ def get_commnet_id(numtime): ...@@ -116,42 +117,40 @@ def get_commnet_id(numtime):
data_reply_reply = cursor.fetchall() data_reply_reply = cursor.fetchall()
cursor.execute( cursor.execute(
"SELECT user_id FROM group_user_role WHERE create_time LIKE '%%%%%s%%%%'" % numtime) "SELECT user_id FROM group_user_role WHERE create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data_group_follow = cursor.fetchall() data_group_follow = cursor.fetchall()
cursor.execute( cursor.execute(
"select user_id from account_user WHERE create_time LIKE '%%%%%s%%%%'" % numtime) "select user_id from account_user WHERE create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data_new_user = cursor.fetchall() data_new_user = cursor.fetchall()
data_id = list(data_comment) data_id = list(data_comment)
data1_id=list(data_reply_topic) data1_id = list(data_reply_topic)
data2_id=list(data_group_follow) data2_id = list(data_group_follow)
data3_id=list(data_new_user) data3_id = list(data_new_user)
data_reply_reply = list(data_reply_reply) data_reply_reply = list(data_reply_reply)
user_id = [] user_id = []
for i in data_id: for i in data_id:
if i[0] is not None: if i[0] is not None:
user_id.append(i) user_id.append(i)
for i in data1_id: for i in data1_id:
if i[0] is not None: if i[0] is not None:
user_id.append(i) user_id.append(i)
for i in data2_id: for i in data2_id:
if i[0] is not None: if i[0] is not None:
user_id.append(i) user_id.append(i)
for i in data3_id: for i in data3_id:
if i[0] is not None: if i[0] is not None:
user_id.append(i) user_id.append(i)
for i in data_reply_reply: for i in data_reply_reply:
if i[0] is not None: if i[0] is not None:
user_id.append(i) user_id.append(i)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -160,6 +159,7 @@ def get_commnet_id(numtime): ...@@ -160,6 +159,7 @@ def get_commnet_id(numtime):
return user_id return user_id
if __name__ == "__main__": if __name__ == "__main__":
try: try:
...@@ -181,27 +181,7 @@ if __name__ == "__main__": ...@@ -181,27 +181,7 @@ if __name__ == "__main__":
cookies = logins() cookies = logins()
if cookies is not None: if cookies is not None:
follow(cookies, id) follow(cookies, id)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -12,7 +12,7 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" ...@@ -12,7 +12,7 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list=[]
...@@ -32,7 +32,7 @@ def get_majia(): ...@@ -32,7 +32,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -95,9 +95,9 @@ def time_conv(numtime): ...@@ -95,9 +95,9 @@ def time_conv(numtime):
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',passwd='oars152!traipseize738',db="alpha", port=3306) db = pymysql.connect(host="172.17.40.144", user='work',passwd='oars152!traipseize738',db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s )" ,(numtime)) cursor.execute("select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s ) and user_id in (select user_id from user_extra where is_shadow = 0)" ,(numtime))
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -113,15 +113,15 @@ if __name__ == "__main__": ...@@ -113,15 +113,15 @@ if __name__ == "__main__":
user_id = get_data(numtime) user_id = get_data(numtime)
for i in user_id: urge_num = random.randint(1,2)
urge_num = random.randint(1,2) for j in range(urge_num):
for j in range(urge_num): for i in user_id:
cookies = index_first() cookies = get_cookies(i)
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cook=logins() cook=logins()
...@@ -129,7 +129,7 @@ if __name__ == "__main__": ...@@ -129,7 +129,7 @@ if __name__ == "__main__":
follow(cook, i) follow(cook, i)
time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -137,9 +137,3 @@ if __name__ == "__main__": ...@@ -137,9 +137,3 @@ if __name__ == "__main__":
...@@ -7,24 +7,21 @@ import traceback ...@@ -7,24 +7,21 @@ import traceback
from log_settings import * from log_settings import *
import logging import logging
auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -32,10 +29,10 @@ def get_majia(): ...@@ -32,10 +29,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -48,21 +45,19 @@ def get_cookies(user_id): ...@@ -48,21 +45,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -71,6 +66,7 @@ def logins(): ...@@ -71,6 +66,7 @@ def logins():
return None return None
def follow(cookies_get, id): def follow(cookies_get, id):
try: try:
post_dict = { post_dict = {
...@@ -87,6 +83,7 @@ def follow(cookies_get, id): ...@@ -87,6 +83,7 @@ def follow(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime): def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -96,13 +93,15 @@ def time_conv(numtime): ...@@ -96,13 +93,15 @@ def time_conv(numtime):
except: except:
return None return None
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("select user_id from pv_maidian where page_name ='home' and partiton_date like '%%%%%s%%%%' " % numtime) cursor.execute(
"select user_id from pv_maidian where page_name ='home' and partiton_date like '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -112,30 +111,24 @@ def get_data(numtime): ...@@ -112,30 +111,24 @@ def get_data(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
numtime = time_conv(1) numtime = time_conv(1)
user_id = get_data(numtime) user_id = get_data(numtime)
urge_num = random.randint(0, 1)
for j in range(urge_num):
for i in user_id:
for i in user_id: id = int(i[0])
id = int(i[0])
urge_num = random.randint(0, 1)
for i in range(urge_num):
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cook=logins() cook = logins()
if cook is not None: if cook is not None:
follow(cook, id)
follow(cook,id) time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -11,19 +11,19 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow" ...@@ -11,19 +11,19 @@ auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
auto_click_url = "http://earth.iyanzhi.com/api/v1/like" auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
def get_majia():
def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -31,10 +31,10 @@ def get_majia(): ...@@ -31,10 +31,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -47,21 +47,19 @@ def get_cookies(user_id): ...@@ -47,21 +47,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -70,8 +68,8 @@ def logins(): ...@@ -70,8 +68,8 @@ def logins():
return None return None
def click(cookies_get, id):
def click(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 0, 'type': 0,
...@@ -87,8 +85,8 @@ def click(cookies_get, id): ...@@ -87,8 +85,8 @@ def click(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def follow(cookies_get, id):
def follow(cookies_get, id):
try: try:
post_dict = { post_dict = {
'type': 1, 'type': 1,
...@@ -106,8 +104,8 @@ def follow(cookies_get, id): ...@@ -106,8 +104,8 @@ def follow(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime):
def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now - datetime.timedelta(days=numtime) yes_time = now - datetime.timedelta(days=numtime)
...@@ -116,14 +114,15 @@ def time_conv(numtime): ...@@ -116,14 +114,15 @@ def time_conv(numtime):
except: except:
return None return None
def get_star_user_id(numtime): def get_star_user_id(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute( cursor.execute(
"SELECT user_id FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime) "SELECT user_id FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -133,14 +132,15 @@ def get_star_user_id(numtime): ...@@ -133,14 +132,15 @@ def get_star_user_id(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
def get_star_topic_id(numtime): def get_star_topic_id(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute( cursor.execute(
"SELECT id FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime) "SELECT id FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time LIKE '%%%%%s%%%%'" % numtime)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -150,11 +150,11 @@ def get_star_topic_id(numtime): ...@@ -150,11 +150,11 @@ def get_star_topic_id(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__":
if __name__ == "__main__":
try: try:
time_list = [1,2,3,4,5,6,7] time_list = [1, 2, 3, 4, 5, 6, 7]
for i in time_list: for i in time_list:
...@@ -162,33 +162,32 @@ if __name__ == "__main__": ...@@ -162,33 +162,32 @@ if __name__ == "__main__":
user_id = get_star_topic_id(numtime) user_id = get_star_topic_id(numtime)
for j in user_id: urge_num = random.randint(0, 1)
id = int(j[0])
urge_num = random.randint(0, 1) for i in range(urge_num):
for j in user_id:
for i in range(urge_num): id = int(j[0])
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cookies = logins() cookies = logins()
if cookies is not None: if cookies is not None:
click(cookies, id) click(cookies, id)
time.sleep(300)
user_id = get_star_user_id(numtime) urge_num = random.randint(1, 2)
for j in user_id: for i in range(urge_num):
id = int(j[0]) user_id = get_star_user_id(numtime)
urge_num = random.randint(1, 2) for j in user_id:
for i in range(urge_num): id = int(j[0])
time.sleep(random.randint(10, 50)) time.sleep(random.randint(1, 10))
cookies = logins() cookies = logins()
...@@ -197,5 +196,3 @@ if __name__ == "__main__": ...@@ -197,5 +196,3 @@ if __name__ == "__main__":
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -12,7 +12,7 @@ auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge" ...@@ -12,7 +12,7 @@ auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list=[]
...@@ -33,7 +33,7 @@ def get_majia(): ...@@ -33,7 +33,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -52,6 +52,7 @@ def get_cookies(user_id): ...@@ -52,6 +52,7 @@ def get_cookies(user_id):
return None return None
def logins(): def logins():
try: try:
...@@ -98,12 +99,12 @@ def time_conv(numtime): ...@@ -98,12 +99,12 @@ def time_conv(numtime):
def get_star_useid(numtime): def get_star_useid(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute( cursor.execute(
"SELECT user_id FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime) "SELECT user_id FROM topic WHERE is_online=1 and (content_level =4 or content_level =5) and create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -141,4 +142,4 @@ if __name__ == "__main__": ...@@ -141,4 +142,4 @@ if __name__ == "__main__":
Urge(cookies, id) Urge(cookies, id)
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
...@@ -12,7 +12,7 @@ auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge" ...@@ -12,7 +12,7 @@ auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
def get_majia(): def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list=[]
...@@ -32,7 +32,7 @@ def get_majia(): ...@@ -32,7 +32,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -51,6 +51,7 @@ def get_cookies(user_id): ...@@ -51,6 +51,7 @@ def get_cookies(user_id):
return None return None
def logins(): def logins():
try: try:
...@@ -94,41 +95,25 @@ def time_conv(numtime): ...@@ -94,41 +95,25 @@ def time_conv(numtime):
except: except:
return None return None
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
db.close()
return user_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
def get_star_useid(numtime):
def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute( cursor.execute("SELECT distinct(user_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 FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime)
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
db.close() db.close()
return user_id return user_id
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
if __name__ == "__main__": if __name__ == "__main__":
try: try:
...@@ -140,15 +125,15 @@ if __name__ == "__main__": ...@@ -140,15 +125,15 @@ if __name__ == "__main__":
user_id = get_data(numtime) user_id = get_data(numtime)
for j in user_id: urge_num = random.randint(0, 2)
id = int(j[0]) for i in range(urge_num):
urge_num = random.randint(0, 2) for j in user_id:
for i in range(urge_num): id = int(j[0])
time.sleep(random.randint(10, 50)) time.sleep(random.randint(3, 10))
cookies=logins() cookies=logins()
...@@ -156,26 +141,6 @@ if __name__ == "__main__": ...@@ -156,26 +141,6 @@ if __name__ == "__main__":
Urge(cookies, id) Urge(cookies, id)
time.sleep(300)
for i in time_list:
numtime = time_conv(i)
user_id = get_star_useid(numtime)
for j in user_id:
id = int(j[0])
for i in range(1):
time.sleep(random.randint(10, 50))
cookies = logins()
if cookies is not None:
Urge(cookies, id)
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
...@@ -9,19 +9,19 @@ import logging ...@@ -9,19 +9,19 @@ import logging
auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge" auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
def get_majia():
def get_majia():
try: try:
data = open("batch_user_gen") data = open("/srv/apps/cybertron/batch_user_gen")
list=[] list = []
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
maj = random.randint(1,len(list)) maj = random.randint(1, len(list))
user_id=list[maj-1] user_id = list[maj - 1]
return user_id return user_id
...@@ -29,10 +29,10 @@ def get_majia(): ...@@ -29,10 +29,10 @@ def get_majia():
logging.error("catch exception,get_majia:%s" % traceback.format_exc()) logging.error("catch exception,get_majia:%s" % traceback.format_exc())
return None return None
def get_cookies(user_id):
def get_cookies(user_id):
try: try:
with open("user_session.txt", 'r') as f: with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -45,21 +45,19 @@ def get_cookies(user_id): ...@@ -45,21 +45,19 @@ def get_cookies(user_id):
for i in list: for i in list:
if user_id == i[0]: if user_id == i[0]:
return (i[1]) return (i[1])
except: except:
return None return None
def logins():
def logins():
try: try:
user_id=get_majia() user_id = get_majia()
cookies = get_cookies(user_id) cookies = get_cookies(user_id)
if cookies is not None: if cookies is not None:
return {'sessionid': cookies} return {'sessionid': cookies}
except: except:
...@@ -68,8 +66,8 @@ def logins(): ...@@ -68,8 +66,8 @@ def logins():
return None return None
def Urge(cookies_get, id):
def Urge(cookies_get, id):
try: try:
post_dict = { post_dict = {
'id': id 'id': id
...@@ -84,6 +82,7 @@ def Urge(cookies_get, id): ...@@ -84,6 +82,7 @@ def Urge(cookies_get, id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def time_conv(numtime): def time_conv(numtime):
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
...@@ -93,13 +92,16 @@ def time_conv(numtime): ...@@ -93,13 +92,16 @@ def time_conv(numtime):
except: except:
return None return None
def get_data(numtime): def get_data(numtime):
try: try:
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', db = pymysql.connect(host="172.17.40.144", user='work',
passwd='oars152!traipseize738', passwd='oars152!traipseize738',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s) ", (numtime)) cursor.execute(
"select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s) and user_id in (select user_id from user_extra where is_shadow = 0)",
(numtime))
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) user_id = list(data)
logging.info("Database version : %s " % user_id) logging.info("Database version : %s " % user_id)
...@@ -109,6 +111,7 @@ def get_data(numtime): ...@@ -109,6 +111,7 @@ def get_data(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
if __name__ == "__main__": if __name__ == "__main__":
try: try:
...@@ -116,29 +119,18 @@ if __name__ == "__main__": ...@@ -116,29 +119,18 @@ if __name__ == "__main__":
user_id = get_data(numtime) user_id = get_data(numtime)
for i in user_id: for j in range(2):
urge_num = random.randint(1, 2) for i in user_id:
for j in range(urge_num):
time.sleep(random.randint(1, 15)) time.sleep(random.randint(1, 15))
cook = logins() cook = logins()
if cook is not None: if cook is not None:
Urge(cook, i) Urge(cook, i)
time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
comment scene 照片色调很好看
最重要的就是开心啦 灌水 用的什么调色工具呀
最近真的丧丧丧,需要up给点好运气 灌水 立马去get同款
最后几张太优秀 灌水 我一个一看就会,动手就废的girl
自己开心最重要 灌水 为什么我拍不出来你的效果?
转需留存 灌水 Po主用的什么拍照软件
种草 get 灌水 这个好,学习了
只想为你打电话!!! 灌水 真的是元气满满
只想点赞 灌水 很帅气!
只为引起up的注意 灌水 这样好显气质!
支持一下. 灌水 好可爱啊,完全没有抵抗力了。
正能量暖心小可爱 灌水 莫名好感中
朕已阅 灌水 满分颜值
真香警告 灌水 超酷!
真美,爱上了 灌水 马住回看
真好      比❤ 灌水 请问发色是啥
真的好喜欢 灌水 请问是什么app拍的啊
真棒,这也是人生态度 灌水 滤镜要怎么选?
真NICE,这是最好的热爱 灌水 卖萌打滚求翻牌
这种感受太真了   简直感同身受啊 灌水 有没有常用自拍姿势教程
这样……真的好么? 灌水 拍照技术满分
这态度很真诚 灌水 日常夸奖博主
这么神奇的么 灌水 日常勾搭
这里这里~我也是!!! 灌水 背景是在哪里?
这里也有矿,黑黑的碳 灌水 照片构图很好看
这话也是十分有道理了!!! 灌水 主要还是看颜值
这个我也会 灌水 你长得很像明星
这个可以有 灌水 支持一下
这个看脸的世界哟 灌水 转需留存
这个好,收藏了 灌水 拍照表情很自然
站着别动。等我去找你 灌水 风格很好
站在前排 灌水 这里是哪里呀?
怎么样才能不长胖呢 灌水 种草了!
怎么搜不到呀 灌水 搭配小技巧get!
怎么能找个女朋友 灌水 怎么都学不会的路过
早安 灌水 太好了,新手学习了
咋这么优秀 灌水 一直支持,只求被翻牌!
越来越喜欢你了 灌水 好喜欢这种风格
有才的人就是各种有才 灌水 好看,在哪儿买的
优秀——十分优秀!!!! 灌水 衣好有气质哦
优秀的人到哪都优秀 灌水 这个我也会
义无反顾,一往直前 灌水 拍照pose求出教程
已 get! 灌水 小姐姐,作图app是啥
一直支持,只求被翻牌!! 灌水 终于更新了
一看po主就是文化人。 灌水 搭配的好好看
夜色很美,你让人醉。 灌水 求同款
耶!前排表达喜爱 灌水 日常催更
要扩散的~ 灌水 get√
要哭了,赞赞赞 灌水 什么时候更新啊
新技能,已GET!! 灌水 果然只要瘦怎么都好看。
心动 灌水 不错的哈哈
谢谢宝宝的分享 灌水 同款达不到楼主的效果
小可爱👍kk 灌水 喜欢你的搭配
想你了!!!照顾好自己 灌水 我拍出来为什么感觉比本人丑很多?
香克斯面子果实加持厉害了 灌水 能多发点全身正面照吗?想看整体效果
喜欢喜欢喜欢你 灌水 这个真的很真实了
喜欢你的自拍 灌水 大圆脸合适吗?
喜欢就支持,不要说其他的 灌水 成功引起了我的注意!
午安 灌水 感觉很少女~
五岁说的就是你了 灌水 不错,继续加油
呜呜呜 你好可爱 灌水 好看的人做什么都好看
我知道你喜欢我,我也喜欢你 灌水 都是人才!!!!
我只能 天啦噜 灌水 道理我都懂,就差一个脸!
我这么可爱,不应该给我点个赞么? 灌水 不赞我良心都过意不去啊
我在疯狂点赞…… 灌水 爱你哟~
我以为我是第一个 灌水 用手机可以拍出来吗?
我天这也太厉害了吧! 灌水 使用相机拍的还是手机
我劝你们善良,热评是我的。 灌水 我觉得很赞
我们不一样。有啥不一样。其实都一样。。。。。。 灌水 颜色搭配很舒服
我来啦~~~ 灌水 小姐姐有戴美瞳吗
我就想问,大家花呗还了么 灌水 看见这个帖心情变好了
我觉得没毛病 灌水 不管怎么样先收藏了
我觉得得赞 灌水 更新更新更新
我很同意 灌水 你和我朋友长得有点像
我反手就是一个赞 灌水 你的风格我都很喜欢
我对你一见钟情了 灌水 好看
我的头像好看么 灌水 我要有你这条件还需要啥拍照技术
我的天呐~ 灌水 太美了!
我瞅瞅 灌水 被圈粉了……
我不管我收藏了 灌水 美而不作,我喜欢
为努力的人点赞 灌水 楼主真的real真实了。
为你骄傲 灌水 持续等更新
为你打电话!!! 灌水 楼主加油,照片拍的不错,非常值得推荐。
为你打call 灌水 大家花呗还了吗?
万一火了呢 灌水 来啦来啦来啦来啦来啦
晚安 灌水 画面太治愈了
哇我是一楼吗? 灌水 楼主辛苦啦
哇哇哇,太优秀了 灌水 不错,跟着学习一下
哇咔咔,羡慕 灌水 心动,我要去试试
哇激动的不知道说什么 灌水 满满的干货,收藏好下次用
哇,超想你的 灌水 新技能get√
突然豹住 灌水 感觉不错mark一下
头一次评论好紧脏呀 灌水 适合自己的才是最重要的
铁粉来报道 灌水 羡慕一下作者的颜
天啊噜 灌水 Omaga太好看了吧~
态度值得我们点赞 灌水 这张拍的不错
太治愈了吧 灌水 这个特效挺可爱的
太喜欢,这是喜悦 灌水 翻我翻我~
太太太太棒了 灌水 这样很显脸小
太美啦 灌水 关注啦
太对了!!! 灌水
说的真好! 灌水
说得好有道理! 灌水
首图好好看 灌水
手残路过 灌水
收藏以后看 灌水
实名吹爆!!!太喜欢了 灌水
十分优秀 灌水
失踪人口回归 灌水
生活的理想,是为了理想的生活 灌水
社会社会 灌水
闪耀到我的卡姿兰大眼睛 灌水
沙发~~~~~~~~ 灌水
三岁不能更多了 灌水
如愿以偿,实至名归 灌水
日常夸奖up主 灌水
日常勾搭up主 灌水
日常打卡 灌水
日常卑微 灌水
热心市民周先生 灌水
热爱 是所有问题的答案! 灌水
让我陪你一起成长 灌水
求偶遇啊啊啊 灌水
抢人头 灌水
前排嘻嘻嘻 灌水
前排吃瓜 灌水
前排表白你~~ 灌水
前排hiho 灌水
评论好可怕,完全不知道在干嘛 灌水
皮一下很开心咯 灌水
皮得很啊! 灌水
佩服的五体投地 灌水
陪你坚持下去 灌水
年少有为不自卑 灌水
腻害腻害 灌水
你最棒! 灌水
你真的是尽了全力了! 灌水
你怎么这么好看 灌水
你怎么能这么懂我 灌水
你们全员都是恶人!!!! 灌水
你就是优秀本秀了 灌水
内容引起舒适! 灌水
南方的小仙女看过来 灌水
奶思~ 灌水
莫名好感中 灌水
明人不说暗话,我超喜欢你的~ 灌水
妙笔生花 灌水
每一位认真的人都值得被尊敬 灌水
每日来一条 灌水
忙于吃瓜 灌水
满满的干货~ 灌水
卖萌打滚求翻牌 灌水
马住回看 灌水
路转粉了 灌水
路人表示很有魅力 灌水
噜啦啦,心情美美哒 灌水
流行趋势 灌水
溜了溜了,溜溜溜 灌水
厉害到无言以对 灌水
了解了 灌水
来啦来啦来啦来啦来啦来啦来啦来啦来啦来啦来 灌水
看了,继续来支持 灌水
看到你就心跳加速了 灌水
举头默默望明月,低头悄悄思念你。 灌水
锦鲤来报道 灌水
姐妹们冲鸭!!! 灌水
坚持前行,用心尝试 灌水
假装都看懂了 灌水
继续继续,百看不厌 灌水
激动激动,前排!!! 灌水
鸡汤好喝,怎么熬的? 灌水
火前留名 灌水
会一直关注的 灌水
回家我也要拍个这种! 灌水
很对味了 灌水
很不错哟~ 灌水
嘿嘿嘿,,你又调皮啦 灌水
好像留言不回复 灌水
好哇好哇 灌水
好励志,为你加油 灌水
好可爱! 灌水
好看耶, 灌水
好的👌安排 灌水
哈哈哈哈哈,大家都是这样想的 灌水
哈哈哈,可以的 灌水
哈哈哈 羡慕了 灌水
果然没让我失望 灌水
广告:不要走开,马上回来 灌水
关注啦 灌水
跟着如此优秀的你,我也要做最好的自己 灌水
给你一个胜利的眼神 灌水
给你101分 灌水
给你100个赞 灌水
给你10000分都不怕你骄傲 灌水
高手高手高高手 灌水
感觉,这才是真正的热爱 灌水
粉你了 灌水
非常的给力呀! 灌水
翻我翻我~ 灌水
嗯嗯嗯嗯嗯呃——优秀 灌水
嗯嗯 我懂得 灌水
点了点了 双击 灌水
第一~必须强啊! 灌水
地板 灌水
带上我哟 灌水
大家花呗还了吗 灌水
大家的心声 灌水
大概说的就是我了 灌水
戳到心窝窝 灌水
戳到我了 灌水
充分说明了知识就是力量 灌水
持续关注 灌水
沉迷于你 灌水
超羡慕你的说 灌水
超可爱der 灌水
超级cute的啦 灌水
超爱你哟~~ 灌水
不赞我良心都过意不去啊 灌水
不要阻止我,我要关注你 灌水
不要阻止我,我要给你点赞 灌水
不瞒你说,看完起鸡皮疙瘩了! 灌水
不管别人说,你是最棒的 灌水
不关注我一定会后悔的 灌水
不错的哈哈 灌水
不错,继续加油 灌水
别拉着我,我不走 灌水
必须要给满分 灌水
被圈粉了.... 灌水
北方的小仙女看过来 灌水
宝贝,你真可爱惹!!!!!! 灌水
棒棒,我喜欢 灌水
帮我找个女朋友吧 灌水
帮我想个请假的理由,在线等挺急的 灌水
板凳 灌水
嗷嗷嗷嗷嗷——超可爱 灌水
嗷嗷嗷~羡慕up 灌水
爱心发射-biubiubiu- 灌水
爱你哟~~ 灌水
爱你哟,BiuBiuBiu~~~ 灌水
爱你然后爱自己 灌水
爱你不是两三天 灌水
爱你❤,么么哒 灌水
爱你,啊啊啊 灌水
爱你 灌水
爱的根源!!! 灌水
哎哟喂 灌水
啊我只是一个正在闹心的考研狗  我好丧啊好丧啊……为啥要在这说这个 灌水
啊……我超喜欢这沙发! 灌水
zqsg吹爆 灌水
zqsg pick wuli xjj 灌水
xswl 灌水
up是不是瘦了 灌水
up是不是胖了 灌水
sixsixsix 灌水
po主挺住,我支持你 灌水
po主你怎么这么厉害 灌水
pick 灌水
mz 灌水
mark,以后再看 灌水
get新技能 灌水
get√ 灌水
dd 灌水
6到没朋友 灌水
6到飞起 灌水
23333333333 灌水
66666666 灌水
中了你的邪 灌水
这是什么神仙操作 灌水
也就看了一个小时 灌水
我想把你带回家 灌水
哇哇哇哇,太刺激了 灌水
太撩了 灌水
忍不住说了一句,哇塞 灌水
缺……对……对象么~ 灌水
来了老弟~ 灌水
别说话,吻我 灌水
啊啊啊,好喜欢 灌水
想长成你这样 灌水
我还能回炉重造么 灌水
我承认你比我帅 灌水
完了,沦陷了 灌水
挺你 灌水
你的照片应该被发现 灌水
老铁666 灌水
真好(微笑) 灌水
这样……不太好吧 灌水
这个风格有点怪 灌水
再瘦一点会更好看吧 灌水
日常敷衍 灌水
其实up应该再胖一点会更好看 灌水
你说的不对吧 灌水
换一个滤镜应该更好看 灌水
好像哪里不太对 灌水
好想看原图,哈哈哈哈哈 灌水
不喜欢这个风格诶 灌水
博主可以出个p图教程了 灌水
up说的有问题 灌水
up考虑换个发型么 灌水
ps搞定世界 灌水
自拍不会摆pose怎么办 灌水
这组照片的主题叫仙女 灌水
这是什么神仙自拍软件 灌水
这是什么神仙滤镜 灌水
用什么相机拍的啊 灌水
用什么软件拍的啊 灌水
用什么p图软件?? 灌水
想问自拍软件是什么呀,真好看 灌水
我也想拍出这样的 灌水
求照片参数 灌水
拍的这么好看有什么诀窍么 灌水
滤镜和美颜都拯救不了我了 灌水
博主一般都用什么滤镜啊 灌水
up主用的什么软件 灌水
up主用的什么滤镜 灌水
import requests import requests
import time
import datetime
import pymysql
import random
import traceback import traceback
# from log_settings import *
import logging import logging
import json
login_url = "http://earth.iyanzhi.com/api/account/login_pwd" login_url = "http://earth.iyanzhi.com/api/account/login_pwd"
def index_first(): def index_first():
try: try:
r1 = requests.get(login_url) r1 = requests.get(login_url)
...@@ -22,56 +17,40 @@ def index_first(): ...@@ -22,56 +17,40 @@ def index_first():
def get_cook(): def get_cook():
data = open("batch_user_gen") data = open("batch_user_gen")
list=[] list = []
dict={} dicts = {}
for i in data: for i in data:
list.append(i.strip('\n').strip(',')) list.append(i.strip('\n').strip(','))
for i in list: for i in list:
cookies = index_first() cookies = index_first()
post_dict={ post_dict = {
'account_type':2, 'account_type': 2,
'pwd':'123456', 'pwd': '123456',
'email':i 'email': i
} }
response = requests.post( response = requests.post(
url=login_url, url=login_url,
data=post_dict, data=post_dict,
cookies=cookies cookies=cookies
) )
headers=response.headers headers = response.headers
print(response.text) print(response.text)
cook = headers['Set-Cookie'].split(";") cook = headers['Set-Cookie'].split(";")
cook = cook[0].split('=')[1] cook = cook[0].split('=')[1]
logging.info("response.text :%s" % response.text) logging.info("response.text :%s" % response.text)
dict[i] = cook dicts[i] = cook
return dict
dict=get_cook() return dicts
with open("user_session.txt" ,'w') as f: dicts = get_cook()
for key,value in dict.items():
with open("user_session.txt", 'w') as f:
for key, value in dicts.items():
f.write(key) f.write(key)
f.write(",") f.write(",")
f.write(value) f.write(value)
f.write("\n") f.write("\n")
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