Commit d5fc91c2 authored by lixiaofang's avatar lixiaofang

add

parent 2079f8f1
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (code)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<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/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.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_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_commnet.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_commnet.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_every_day.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_every_day.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_follow.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_follow.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_follow_majia.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_follow_majia.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_follow_new.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_follow_new.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_follow_one.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_follow_one.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_lunch_app.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_lunch_app.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_request.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_request.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_star_topic.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_star_topic.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_three.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge_three.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/offline_comment.py" beforeDir="false" afterPath="$PROJECT_DIR$/offline_comment.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -24,7 +43,7 @@
<entry key="batch_user_gen" value="2" />
<entry key="comment" value="2" />
<entry key="guanshui" value="2" />
<entry key="py" value="90" />
<entry key="py" value="123" />
<entry key="txt" value="1" />
<entry key="xuqiu" value="2" />
</counts>
......@@ -32,22 +51,22 @@
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="PLAIN_TEXT" value="9" />
<entry key="Python" value="90" />
<entry key="Python" value="123" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="comment" value="59" />
<entry key="dummy" value="1" />
<entry key="dummy" value="6" />
<entry key="guanshui" value="2" />
<entry key="py" value="2175" />
<entry key="py" value="2622" />
<entry key="xuqiu" value="223" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="285" />
<entry key="Python" value="2175" />
<entry key="PLAIN_TEXT" value="290" />
<entry key="Python" value="2622" />
</counts>
</usages-collector>
</session>
......@@ -114,88 +133,56 @@
</session>
</component>
<component name="FileEditorManager">
<splitter split-orientation="horizontal" split-proportion="0.80259097">
<split-first>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="39" column="32" selection-start-line="39" selection-start-column="32" selection-end-line="39" selection-end-column="32" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_user_id.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="35" selection-start-line="35" selection-end-line="35" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="379">
<caret line="30" selection-start-line="30" selection-end-line="34" selection-end-column="12" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click_n.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="790">
<caret line="153" selection-start-line="153" selection-end-line="153" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="760">
<caret line="145" selection-start-line="145" selection-end-line="145" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-first>
<split-second>
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1149">
<caret line="179" lean-forward="true" selection-start-line="179" selection-end-line="179" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-second>
</splitter>
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495">
<caret line="33" column="31" selection-start-line="33" selection-start-column="31" selection-end-line="33" selection-end-column="31" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="307">
<caret line="48" column="51" selection-start-line="48" selection-start-column="51" selection-end-line="48" selection-end-column="51" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142">
<caret line="32" column="41" lean-forward="true" selection-start-line="32" selection-start-column="41" selection-end-line="32" selection-end-column="41" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-130">
<caret line="22" column="31" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="31" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
......@@ -213,6 +200,7 @@
<find>s_4HRYFK@shadow.com</find>
<find>s_PoKDa9@shadow.com</find>
<find>dict</find>
<find>celery_task</find>
</findStrings>
<dirStrings>
<dir>$PROJECT_DIR$</dir>
......@@ -224,8 +212,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/comment" />
<option value="$PROJECT_DIR$/data" />
<option value="$PROJECT_DIR$/xuqiu" />
<option value="$PROJECT_DIR$/unr_data" />
<option value="$PROJECT_DIR$/cuigeng" />
......@@ -247,29 +233,35 @@
<option value="$PROJECT_DIR$/auto_click_ssss.py" />
<option value="$PROJECT_DIR$/batch_user_gen" />
<option value="$PROJECT_DIR$/guanshui" />
<option value="$PROJECT_DIR$/celeryconfig.py" />
<option value="$PROJECT_DIR$/celery.py" />
<option value="$PROJECT_DIR$/epp_scripts/test1.py" />
<option value="$PROJECT_DIR$/epp_scripts/test2.py" />
<option value="$PROJECT_DIR$/mysql_config.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_new.py" />
<option value="$PROJECT_DIR$/auto_follow_one.py" />
<option value="$PROJECT_DIR$/auto_lunch_app.py" />
<option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_star_urge.py" />
<option value="$PROJECT_DIR$/auto_urge.py" />
<option value="$PROJECT_DIR$/auto_urge_three.py" />
<option value="$PROJECT_DIR$/test.py" />
<option value="$PROJECT_DIR$/offline)comment.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_user_id.py" />
<option value="$PROJECT_DIR$/auto_click_n.py" />
<option value="$PROJECT_DIR$/auto_star_urge.py" />
<option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_follow_new.py" />
<option value="$PROJECT_DIR$/auto_follow_majia.py" />
<option value="$PROJECT_DIR$/auto_commnet.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/auto_urge.py" />
<option value="$PROJECT_DIR$/auto_urge_three.py" />
<option value="$PROJECT_DIR$/auto_every_day.py" />
<option value="$PROJECT_DIR$/auto_follow.py" />
<option value="$PROJECT_DIR$/auto_lunch_app.py" />
<option value="$PROJECT_DIR$/auto_follow_one.py" />
<option value="$PROJECT_DIR$/epp_scripts/tasks.py" />
<option value="$PROJECT_DIR$/epp_scripts/test1.py" />
<option value="$PROJECT_DIR$/epp_scripts/test2.py" />
<option value="$PROJECT_DIR$/celeryconfig.py" />
<option value="$PROJECT_DIR$/epp_scripts/celery.py" />
<option value="$PROJECT_DIR$/tasks/instant.py" />
<option value="$PROJECT_DIR$/epp_scripts/celery_task_router.py" />
<option value="$PROJECT_DIR$/tasks/auto_at_once.py" />
<option value="$PROJECT_DIR$/_celery.py" />
<option value="$PROJECT_DIR$/auto_click.py" />
<option value="$PROJECT_DIR$/auto_request.py" />
<option value="$PROJECT_DIR$/auto_at_once.py" />
<option value="$PROJECT_DIR$/offline_comment.py" />
</list>
</option>
......@@ -305,10 +297,12 @@
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/epp_scripts" />
</key>
<key name="MoveFile.RECENT_KEYS">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/tasks" />
<recent name="$PROJECT_DIR$" />
</key>
</component>
......@@ -324,7 +318,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Python.auto_follow">
<component name="RunManager" selected="Python.auto_request">
<configuration name="auto_commnet" type="PythonConfigurationType" factoryName="Python">
<module name="cybertron" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -367,7 +361,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="dd" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="auto_request" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="cybertron" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -379,7 +373,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/dd.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/auto_request.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -388,7 +382,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="exe" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="dd" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="cybertron" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -400,7 +394,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/auto_follow_new.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/dd.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -409,7 +403,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="exercise" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="exe" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="cybertron" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -421,7 +415,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/exercise.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/auto_follow_new.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -453,19 +447,19 @@
</configuration>
<list>
<item itemvalue="Python.auto_commnet" />
<item itemvalue="Python.exercise" />
<item itemvalue="Python.exe" />
<item itemvalue="Python.dd" />
<item itemvalue="Python.test" />
<item itemvalue="Python.auto_follow" />
<item itemvalue="Python.auto_request" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.auto_request" />
<item itemvalue="Python.auto_follow" />
<item itemvalue="Python.test" />
<item itemvalue="Python.dd" />
<item itemvalue="Python.exe" />
<item itemvalue="Python.exercise" />
</list>
</recent_temporary>
</component>
......@@ -487,20 +481,21 @@
</component>
<component name="ToolWindowManager">
<frame x="-322" y="-1080" width="1920" height="1080" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" />
<window_info id="Favorites" order="1" side_tool="true" />
<window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.14639284" />
<window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.14639284" />
<window_info id="DB Browser" order="3" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32909092" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.46830985" />
<window_info anchor="bottom" id="Run" order="2" weight="0.0" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.56363636" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.29533678" />
<window_info anchor="bottom" id="Terminal" order="8" visible="true" weight="0.1119171" />
<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="DB Execution Console" order="11" />
......@@ -536,31 +531,30 @@
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_click_n.py</url>
<line>9</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_every_day.py</url>
<line>101</line>
<line>12</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_star_topic.py</url>
<line>37</line>
<line>12</line>
<option name="timeStamp" value="4" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_star_urge.py</url>
<line>59</line>
<line>13</line>
<option name="timeStamp" value="5" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_star_topic.py</url>
<line>119</line>
<line>13</line>
<option name="timeStamp" value="6" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/auto_urge.py</url>
<option name="timeStamp" value="7" />
</line-breakpoint>
</breakpoints>
<breakpoints-dialog>
<breakpoints-dialog />
......@@ -575,8 +569,6 @@
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/comment_data.csv" />
<entry file="file://$PROJECT_DIR$/comment_data" />
<entry file="file://$PROJECT_DIR$/xuqiu" />
<entry file="file://$PROJECT_DIR$/auto_start_up.py" />
<entry file="file://$PROJECT_DIR$/cuigeng" />
......@@ -619,16 +611,6 @@
<entry file="file://$PROJECT_DIR$/user_session" />
<entry file="file://$PROJECT_DIR$/user_session.json" />
<entry file="file://$PROJECT_DIR$/auto_click_ssss.py" />
<entry file="file://$PROJECT_DIR$/celeryconfig.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="645">
<caret line="43" selection-start-line="43" selection-end-line="43" />
<folding>
<element signature="e#0#91#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/celery.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
......@@ -660,13 +642,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/epp_scripts/test2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mysql_config.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
......@@ -677,174 +652,220 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_every_day.py">
<entry file="file://$PROJECT_DIR$/batch_user_gen">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="103" column="34" lean-forward="true" selection-start-line="103" selection-end-line="104" />
<state relative-caret-position="758">
<caret line="299" column="3" selection-start-line="299" selection-start-column="3" selection-end-line="299" selection-end-column="4" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="34" selection-start-line="4" selection-start-column="34" selection-end-line="4" selection-end-column="34" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#133#193#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow.py">
<entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="253">
<caret line="104" column="68" selection-start-line="104" selection-end-line="105" />
<state relative-caret-position="90">
<caret line="11" selection-start-line="11" selection-end-line="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#132#192#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_new.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="15" lean-forward="true" selection-start-column="15" selection-end-column="15" />
<state relative-caret-position="150">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<folding>
<element signature="e#133#193#0" />
<element signature="e#3992#4470#0" />
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_one.py">
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="488">
<caret line="129" column="26" selection-start-line="129" selection-start-column="26" selection-end-line="129" selection-end-column="26" />
<state relative-caret-position="150">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#132#134#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_star_urge.py">
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="15" lean-forward="true" selection-start-column="15" selection-end-column="15" />
<state relative-caret-position="120">
<caret line="11" selection-start-line="11" selection-end-line="11" />
<folding>
<element signature="e#266#327#0" />
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/batch_user_gen">
<entry file="file://$PROJECT_DIR$/auto_lunch_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="758">
<caret line="299" column="3" selection-start-line="299" selection-start-column="3" selection-end-line="299" selection-end-column="4" />
<state relative-caret-position="150">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_follow_majia.py">
<entry file="file://$PROJECT_DIR$/auto_follow_one.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="80" column="47" lean-forward="true" selection-start-line="80" selection-end-line="81" />
<state relative-caret-position="165">
<caret line="11" selection-start-line="11" selection-end-line="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#154#211#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_lunch_app.py">
<entry file="file://$PROJECT_DIR$/auto_click_n.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="132" selection-start-line="132" selection-end-line="132" />
<state relative-caret-position="-189">
<caret line="6" column="14" lean-forward="true" selection-start-line="6" selection-start-column="14" selection-end-line="6" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/epp_scripts/test2.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="20" selection-start-line="20" selection-end-line="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tasks/instant.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" selection-start-line="1" selection-end-line="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/epp_scripts/celery_task_router.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="31" selection-start-line="9" selection-start-column="31" selection-end-line="9" selection-end-column="31" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#133#193#0" />
<element signature="e#90#162#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<entry file="file://$PROJECT_DIR$/epp_scripts/celery.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="103" column="54" selection-start-line="103" selection-end-line="104" />
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#152#213#0" />
<element signature="e#0#56#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test.py">
<entry file="file://$PROJECT_DIR$/epp_scripts/test1.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="34" selection-start-line="4" selection-start-column="34" selection-end-line="4" selection-end-column="34" />
<state relative-caret-position="15">
<caret line="1" selection-start-line="1" selection-end-line="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tasks/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="30" column="26" selection-start-line="30" selection-start-column="26" selection-end-line="30" selection-end-column="26" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#309#900#0" />
<element signature="e#934#1882#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge_three.py">
<entry file="file://$PROJECT_DIR$/_celery.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/celeryconfig.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="690">
<caret line="127" column="28" selection-start-line="127" selection-start-column="28" selection-end-line="127" selection-end-column="28" />
<state relative-caret-position="180">
<caret line="12" column="34" selection-start-line="12" selection-start-column="34" selection-end-line="12" selection-end-column="34" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#0#91#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<entry file="file://$PROJECT_DIR$/auto_user_id.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-4">
<caret line="140" column="93" selection-start-line="140" selection-start-column="57" selection-end-line="140" selection-end-column="93" />
<state relative-caret-position="135">
<caret line="9" column="35" selection-start-line="9" selection-end-line="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" selection-start-line="12" selection-end-line="12" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_click.py">
<entry file="file://$PROJECT_DIR$/auto_star_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2025">
<caret line="135" selection-start-line="135" selection-end-line="135" />
<state relative-caret-position="195">
<caret line="13" selection-start-line="13" selection-end-line="13" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<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">
<state relative-caret-position="790">
<caret line="153" selection-start-line="153" selection-end-line="153" />
<state relative-caret-position="165">
<caret line="11" selection-start-line="11" selection-end-line="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_user_id.py">
<entry file="file://$PROJECT_DIR$/auto_urge_three.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="35" selection-start-line="35" selection-end-line="35" />
<state relative-caret-position="165">
<caret line="11" selection-start-line="11" selection-end-line="11" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<entry file="file://$PROJECT_DIR$/auto_every_day.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1149">
<caret line="179" lean-forward="true" selection-start-line="179" selection-end-line="179" />
<state relative-caret-position="150">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_commnet.py">
<entry file="file://$PROJECT_DIR$/auto_click.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="760">
<caret line="145" selection-start-line="145" selection-end-line="145" />
<state relative-caret-position="142">
<caret line="32" column="41" lean-forward="true" selection-start-line="32" selection-start-column="41" selection-end-line="32" selection-end-column="41" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......@@ -853,8 +874,18 @@
</entry>
<entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="379">
<caret line="30" selection-start-line="30" selection-end-line="34" selection-end-column="12" />
<state relative-caret-position="-130">
<caret line="22" column="31" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="31" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495">
<caret line="33" column="31" selection-start-line="33" selection-start-column="31" selection-end-line="33" selection-end-column="31" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......@@ -863,8 +894,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="39" column="32" selection-start-line="39" selection-start-column="32" selection-end-line="39" selection-end-column="32" />
<state relative-caret-position="307">
<caret line="48" column="51" selection-start-line="48" selection-start-column="51" selection-end-line="48" selection-end-column="51" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
......
......@@ -11,131 +11,12 @@ from auto_request import login, reply, click, get_comments, time_conv
from auto_request import host, user, port, db, passwd
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
# list = []
# for i in data:
# list.append(i.strip('\n').strip(','))
# maj = random.randint(1, len(list))
# user_id = list[maj - 1]
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def login():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def click(cookies_get, id):
# try:
# post_dict = {
# 'type': 0,
# 'id': id
# }
# response = requests.post(url=auto_click_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def reply(cookies_get, id, content):
# try:
# post_dict = {
# 'topic_id': id,
# 'content': content
# }
# response = requests.post(url=auto_reply_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv():
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(minutes=15)
# print(yes_time)
# return yes_time
#
# except:
# return None
#
#
# def get_comment():
# try:
# data = open("/srv/apps/cybertron/guanshui", "r")
# list_guanshui = []
# for i in data:
# list_guanshui.append(i)
# num = random.randint(0, len(list_guanshui))
# comment = list_guanshui[num - 1]
#
# return comment
#
# except:
#
# return None
# 9,12,18,2
def get_topic_id(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.cursor()
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)",
"SELECT user_id ,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()
user_id = list(data)
......@@ -154,12 +35,11 @@ if __name__ == "__main__":
topic_id = get_topic_id(numtime)
click_num = random.randint(1, 3)
click_num = random.randint(1, 5)
for i in range(click_num):
for j in topic_id:
id = int(j[0])
cookies = login()
......@@ -185,13 +65,15 @@ if __name__ == "__main__":
cookies = login()
if cookies is not None:
comment = comment_content[i]
time.sleep(random.randint(10,20))
time.sleep(random.randint(10, 20))
reply(cookies, id, comment)
time.sleep(300)
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
# 发帖瞬时:[1 - 5]个马甲点赞
# 1. 用户发帖后,[瞬时],1-3条评论
......@@ -7,91 +7,8 @@ import traceback
from log_settings import *
import logging
from auto_request import login, click, time_convs
from auto_request import host,user,port,db,passwd
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def login():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def click(cookies_get, id):
# try:
# post_dict = {
# 'type': 0,
# 'id': id
# }
# response = requests.post(url=auto_click_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
from auto_request import host, user, port, db, passwd
def get_data(numtime):
try:
......@@ -132,8 +49,6 @@ if __name__ == "__main__":
else:
dicts[i[0]].append(i[1])
print(dicts)
for key, value in dicts.items():
rand_num = random.randint(0, len(value) - 1)
......@@ -153,3 +68,5 @@ if __name__ == "__main__":
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
# 2. 每日一次轮询,昨、2、3、4、5、6、7日新增帖的用户:[0-1]个马甲点赞。每天每人最多一个帖子点赞,不要100个帖子都0-1。
......@@ -6,93 +6,8 @@ import random
import traceback
import logging
from auto_request import login, click, time_convs
from auto_request import host,user,port,db,passwd
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def click(cookies_get, id):
# try:
# post_dict = {
# 'type': 0,
# 'id': id
# }
# response = requests.post(url=auto_click_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
#
from auto_request import host, user, port, db, passwd
def get_data(numtime):
try:
......@@ -100,7 +15,7 @@ def get_data(numtime):
cursor = pc.cursor()
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)
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0)" % numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
......@@ -151,8 +66,9 @@ if __name__ == "__main__":
cook = login()
if cook is not None:
click(cook, rand_id)
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
# 7天后,每日一次轮询,3*n日前新增帖子:[0-1]个马甲点赞。每天每人最多一个帖子点赞。
......@@ -9,109 +9,13 @@ from auto_request import login, time_convs, reply, get_comment
from auto_request import host, user, port, db, passwd
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen.txt")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def reply(cookies_get, id, content):
# try:
# post_dict = {
# 'topic_id': id,
# 'content': content
# }
# response = requests.post(url=auto_reply_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text :%s" % (response.text))
#
# except:
# logging.error("catch exception,reply:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
# def get_comment():
# data = open("/srv/apps/cybertron/guanshui")
#
# list_guanshui = []
# for i in data:
# list_guanshui.append(i)
# num = random.randint(0, len(list_guanshui))
# comment = list_guanshui[num - 1]
# return comment
def get_topic_id(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.cursor()
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)
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' and user_id in (select user_id from user_extra where is_shadow = 0) " % numtime)
data = cursor.fetchall()
topic_id = list(data)
logging.info("Database version : %s " % topic_id)
......@@ -134,18 +38,38 @@ if __name__ == "__main__":
topic_id = get_topic_id(numtime)
dicts = {}
for i in topic_id:
if i[0] not in dicts.keys():
dicts.setdefault(i[0], [])
dicts[i[0]].append(i[1])
else:
dicts[i[0]].append(i[1])
comment = get_comment()
for id in topic_id:
for key, value in dicts.items():
time.sleep(random.randint(1, 10))
rand_num = random.randint(0, len(value) - 1)
cook = login()
rand_id = value[rand_num]
if cook is not None:
for i in range(1):
reply(cook, id, comment)
time.sleep(random.randint(10, 20))
cook = login()
if cook is not None:
reply(cook, id, comment)
except:
logging.error("catch exception,main :%s" % traceback.format_exc())
#. 每日一次轮询,昨、2、3、4、5、6、7日新增帖的用户:随机从马甲库里取一个马甲,搭配随机评论库一条评论。每天每人最多一个帖子被评论。
\ No newline at end of file
......@@ -10,95 +10,6 @@ from auto_request import login, time_convs, follow
from auto_request import host, user, port, db, passwd
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
# auto_pick_url = "http://earth.iyanzhi.com/api/v1/pick/do_pick"
#
#
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_topic_new_user(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
......
......@@ -10,95 +10,6 @@ from auto_request import login, time_convs, follow
from auto_request import host, user, port, db, passwd
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
#
#
# def get_majia():
#
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list=[]
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1,len(list))
#
# user_id=list[maj-1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
# def get_cookies(user_id):
#
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
#
# return (i[1])
# except:
#
# return None
#
# def logins():
#
# try:
# user_id=get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
#
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
# def follow(cookies_get, id):
#
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_data(numtime):
try:
......
......@@ -11,71 +11,6 @@ from auto_request import login, time_conv, follow
from auto_request import host, user, port, db, passwd
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins(user_id):
# try:
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv():
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(minutes=15)
# return yes_time
# except:
# return None
def get_follw_majia(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
......
......@@ -9,93 +9,6 @@ import logging
from auto_request import login, time_convs, follow
from auto_request import host, user, port, db, passwd
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
#
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_commnet_id(numtime):
......
......@@ -10,98 +10,12 @@ from auto_request import login, time_conv, follow,get_cookies
from auto_request import host, user, port, db, passwd
#
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
# def get_majia():
#
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list=[]
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1,len(list))
#
# user_id=list[maj-1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
# def get_cookies(user_id):
#
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
#
# return (i[1])
# except:
#
# return None
#
# def logins():
#
# try:
# user_id=get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
#
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_data(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.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 ) and user_id in (select user_id from user_extra where is_shadow = 0)" ,(numtime))
cursor.execute("select distinct(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()
user_id = list(data)
logging.info("Database version : %s " % user_id)
......@@ -125,7 +39,7 @@ if __name__ == "__main__":
cookies = get_cookies(i)
time.sleep(random.randint(1, 10))
time.sleep(random.randint(10, 40))
cook=login()
......
......@@ -9,91 +9,6 @@ import logging
from auto_request import login, time_convs,follow
from auto_request import host,user,port,db,passwd
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
#
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_data(numtime):
......@@ -101,7 +16,7 @@ def get_data(numtime):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.cursor()
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)
"select distinct(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()
user_id = list(data)
logging.pcinfo("Database version : %s " % user_id)
......
import requests
import time
import datetime
import pymysql
import random
import pandas as pd
import traceback
from log_settings import *
import logging
import pymysql
import logging
import log_settings
import traceback
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
......@@ -22,17 +15,31 @@ auto_reply_url = "http://earth.igengmei.com/api/v1/reply/create"
auto_follow_url = "http://earth.igengmei.com/api/v1/follow"
auto_urge_url = "http://earth.igengmei.com/api/v1/user/urge"
# host = "172.17.40.144"
# user = "work"
# passwd = 'oars152!traipseize738'
# db = "alpha"
# port = 3306
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alpha',
'USER': 'work',
'PASSWORD': 'Gengmei123',
'HOST': 'rm-2zeaut61u9sm21m0b.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
}
}
host = DATABASES['default']['host']
user = DATABASES['default']['USER']
host = "rm-2zeaut61u9sm21m0b.mysql.rds.aliyuncs.com"
user = "work"
passwd = "Gengmei123"
db = "alpha"
port =3306
port = DATABASES['default']['PORT']
db = DATABASES['default']['NAME']
passwd = DATABASES['default']['PASSWORD']
def get_majia():
......@@ -160,7 +167,6 @@ def get_comment():
return None
def get_comments():
try:
data = open("/srv/apps/cybertron/guanshui", "r")
......@@ -176,8 +182,7 @@ def get_comments():
comment2 = list_guanshui[num2 - 1]
comment3 = list_guanshui[num3 - 1]
comment_list = [comment1,comment2,comment3]
comment_list = [comment1, comment2, comment3]
return comment_list
......
......@@ -10,112 +10,6 @@ from auto_request import login, time_conv, follow,click
from auto_request import host, user, port, db, passwd
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
#
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
#
#
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def click(cookies_get, id):
# try:
# post_dict = {
# 'type': 0,
# 'id': id
# }
# response = requests.post(url=auto_click_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def follow(cookies_get, id):
# try:
# post_dict = {
# 'type': 1,
# 'id': id
# }
# response = requests.post(url=auto_follow_url,
# cookies=cookies_get,
# data=post_dict)
#
# print(response.text, 'url')
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_star_user_id(numtime):
try:
......@@ -140,10 +34,10 @@ def get_star_topic_id(numtime):
cursor.execute(
"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()
user_id = list(data)
topic_id = list(data)
logging.info("Database version : %s " % user_id)
pc.close()
return user_id
return topic_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
......@@ -158,27 +52,24 @@ if __name__ == "__main__":
numtime = time_conv(i)
user_id = get_star_topic_id(numtime)
topic_id = get_star_topic_id(numtime)
for j in topic_id:
urge_num = random.randint(0, 1)
id = int(j[0])
for i in range(urge_num):
for j in user_id:
urge_num = random.randint(0, 1)
id = int(j[0])
for i in range(urge_num):
time.sleep(random.randint(1, 10))
time.sleep(random.randint(10, 20))
cookies = login()
if cookies is not None:
click(cookies, id)
time.sleep(300)
urge_num = random.randint(1, 2)
for i in range(urge_num):
time.sleep(300)
user_id = get_star_user_id(numtime)
......@@ -186,12 +77,27 @@ if __name__ == "__main__":
id = int(j[0])
time.sleep(random.randint(1, 10))
for i in range(1):
time.sleep(random.randint(10, 20))
cookies = login()
if cookies is not None:
follow(cookies, id)
cookies = login()
if cookies is not None:
follow(cookies, id)
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
#每日一次轮询,昨、2、3、4、5、6、7日被选为4、5星的帖子:[0-1]个马甲点赞。
#每日一次轮询,昨日有帖子被选为4、5星的用户:[1-2]个粉丝
\ No newline at end of file
......@@ -11,94 +11,6 @@ from auto_request import login, time_conv, Urge
from auto_request import host, user, port, db, passwd
# auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
# def get_majia():
#
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list=[]
#
# for i in data:
#
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1,len(list))
#
# user_id=list[maj-1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
# def get_cookies(user_id):
#
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
#
# return (i[1])
# except:
#
# return None
#
#
# def logins():
#
# try:
# user_id=get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
#
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
# def Urge(cookies_get, id):
#
# try:
# post_dict = {
# 'id': id
# }
# response = requests.post(url=auto_urge_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# def time_conv(numtime):
#
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_star_useid(numtime):
......@@ -106,7 +18,7 @@ def get_star_useid(numtime):
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.cursor()
cursor.execute(
"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)
"SELECT distinct(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()
user_id = list(data)
logging.info("Database version : %s " % user_id)
......
......@@ -10,94 +10,7 @@ import logging
from auto_request import login, time_conv, Urge
from auto_request import host, user, port, db, passwd
# auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
#
# def get_majia():
#
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list=[]
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1,len(list))
#
# user_id=list[maj-1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
# def get_cookies(user_id):
#
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
#
# return (i[1])
# except:
#
# return None
#
#
# def logins():
#
# try:
# user_id=get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
#
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
# def Urge(cookies_get, id):
#
# try:
# post_dict = {
# 'id': id
# }
# response = requests.post(url=auto_urge_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# def time_conv(numtime):
#
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
#
def get_data(numtime):
try:
......
......@@ -10,97 +10,13 @@ import logging
from auto_request import login, time_conv, Urge
from auto_request import host, user, port, db, passwd
# auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
#
# def get_majia():
# try:
# data = open("/srv/apps/cybertron/batch_user_gen")
#
# list = []
#
# for i in data:
# list.append(i.strip('\n').strip(','))
#
# maj = random.randint(1, len(list))
#
# user_id = list[maj - 1]
#
# return user_id
#
# except:
# logging.error("catch exception,get_majia:%s" % traceback.format_exc())
# return None
#
#
# def get_cookies(user_id):
# try:
# with open("/srv/apps/cybertron/user_session.txt", 'r') as f:
# try:
# data = f.readlines()
# except:
# data = None
#
# list = []
# for i in data:
# list.append(i.strip('\n').split(","))
#
# for i in list:
#
# if user_id == i[0]:
# return (i[1])
# except:
#
# return None
#
#
# def logins():
# try:
# user_id = get_majia()
#
# cookies = get_cookies(user_id)
#
# if cookies is not None:
# return {'sessionid': cookies}
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
# return None
#
#
# def Urge(cookies_get, id):
# try:
# post_dict = {
# 'id': id
# }
# response = requests.post(url=auto_urge_url,
# cookies=cookies_get,
# data=post_dict)
#
# logging.info("response.text:%s" % response.text)
#
# except:
#
# logging.error("catch exception,logins:%s" % traceback.format_exc())
#
#
# def time_conv(numtime):
# try:
# now = datetime.datetime.now()
# yes_time = now - datetime.timedelta(days=numtime)
# yes_time_str = yes_time.strftime('%Y-%m-%d')
# return yes_time_str
# except:
# return None
def get_data(numtime):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=port)
cursor = pc.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) and user_id in (select user_id from user_extra where is_shadow = 0)",
"select distinct(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()
user_id = list(data)
......@@ -123,7 +39,7 @@ if __name__ == "__main__":
for i in user_id:
time.sleep(random.randint(1, 15))
time.sleep(random.randint(10, 15))
cook = login()
......
......@@ -7,8 +7,8 @@ import pandas as pd
import traceback
from log_settings import *
import logging
from auto_request import logins, reply, get_offline_comment, time_convs
from auto_request import host, user, port, db, passwd
from auto_request import logins, reply, get_offline_comment, time_convs
from auto_request import host, user, db, passwd
auto_click_url = "http://earth.igengmei.com/api/v1/like"
auto_reply_url = "http://earth.igengmei.com/api/v1/reply/create"
......@@ -25,12 +25,13 @@ auto_urge_url = "http://earth.igengmei.com/api/v1/user/urge"
# 注意需要禁止本帖作者评论
def get_data(numtime):
def get_data(numtime, numtime2):
try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor()
cursor.execute( "SELECT id FROM topic WHERE is_online =1 and create_time >= %s and (content_level = 4 or content_level = 5) and user_id in (select user_id from user_extra where is_shadow = 0)",(numtime))
cursor.execute(
"SELECT id FROM topic WHERE is_online =1 and create_time <= %s and create_time >=%s and (content_level = 4 or content_level = 5) and user_id in (select user_id from user_extra where is_shadow = 0)",
(numtime, numtime2))
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
......@@ -45,13 +46,11 @@ if __name__ == "__main__":
try:
time_list = [1, 2, 3, 4, 5, 6, 7]
time_list = [["2017-03-30 15:57:49.000000", "2010-03-30 15:57:49.000000"]]
for i in time_list:
numtime = time_convs(i)
topic_id = get_data(numtime)
topic_id = get_data(i[0], i[1])
dicts = {}
......@@ -62,8 +61,7 @@ if __name__ == "__main__":
comment_list = get_offline_comment()
for i in rand_num:
cook =logins()
cook = logins()
comment = get_offline_comment()
......
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