Commit 77726b0a authored by litaolemo's avatar litaolemo

update

parent 7e478d56
......@@ -71,7 +71,7 @@ parser.add_argument('-name', '--name', default="crawler01", type=str,
help=('this computer name'))
args = parser.parse_args()
# rds_1 = redis.StrictRedis(host='172.16.40.164', port=6379, db=19, decode_responses=True, password='ReDis!GmTx*0aN12')
rds_save = redis.StrictRedis(host='172.16.40.164', port=6379, db=18, decode_responses=True, password='ReDis!GmTx*0aN12')
rds_1 = redis.StrictRedis(host='172.18.51.10', port=6379, db=19, decode_responses=True)
rds_17 = redis.StrictRedis(host='172.18.51.10', port=6379, db=17, decode_responses=True)
platform_crawler_reg = {
......@@ -217,7 +217,7 @@ def single_thead(processe,name):
if count_false > allow*3:
break
else:
rds_1.hset("weibo", key=single_data["doc_id"], value=json.dumps(single_data))
rds_save.hset("weibo", key=single_data["doc_id"], value=json.dumps(single_data))
# if len(data_list) >= 100:
# output_result(result_Lst=data_list,
# platform=platform,
......@@ -233,7 +233,7 @@ def single_thead(processe,name):
print("processe"+ str(processe) + " " +threading.current_thread().name + " down " + platform + str(count))
if not count_has:
releaser_body["mssage"] = "爬取失败,请检查账号"
rds_1.hset("error",releaser_body["platform"] + "/" +releaser_body["releaserUrl"],json.dumps(releaser_body))
rds_save.hset("error",releaser_body["platform"] + "/" +releaser_body["releaserUrl"],json.dumps(releaser_body))
# if data_list != []:
# output_result(result_Lst=data_list,
......
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