Commit e32b3889 authored by litaolemo's avatar litaolemo

update

parent 086f306c
...@@ -44,7 +44,7 @@ import threading ...@@ -44,7 +44,7 @@ import threading
# # 连接数据库 # # 连接数据库
# rds_1 = sentinel.master_for('ida_redis_master', socket_timeout=1, db=1, decode_responses=True) # rds_1 = sentinel.master_for('ida_redis_master', socket_timeout=1, db=1, decode_responses=True)
rds_1 = redis.StrictRedis(host='172.16.40.164', port=6379, db=19, decode_responses=True, password='ReDis!GmTx*0aN12')
parser = argparse.ArgumentParser(description='Specify a platform name.') parser = argparse.ArgumentParser(description='Specify a platform name.')
parser.add_argument('-n', '--max_page', default=30, type=int, parser.add_argument('-n', '--max_page', default=30, type=int,
help=('The max page numbers to be scroll for each releaser url, ' help=('The max page numbers to be scroll for each releaser url, '
...@@ -71,6 +71,8 @@ parser.add_argument('-name', '--name', default="crawler01", type=str, ...@@ -71,6 +71,8 @@ parser.add_argument('-name', '--name', default="crawler01", type=str,
help=('this computer name')) help=('this computer name'))
args = parser.parse_args() args = parser.parse_args()
rds_1 = redis.StrictRedis(host='172.16.40.164', port=6379, db=19, decode_responses=True, password='ReDis!GmTx*0aN12')
platform_crawler_reg = { platform_crawler_reg = {
'toutiao': crawler_toutiao.Crawler_toutiao, 'toutiao': crawler_toutiao.Crawler_toutiao,
'toutiao_article': toutiao_article.Crawler_toutiao_article, 'toutiao_article': toutiao_article.Crawler_toutiao_article,
...@@ -180,6 +182,8 @@ def get_task_from_redis(): ...@@ -180,6 +182,8 @@ def get_task_from_redis():
def single_thead(processe,name): def single_thead(processe,name):
allow = 10 allow = 10
data_list = [] data_list = []
rds_1 = redis.StrictRedis(host='172.16.40.164', port=6379, db=19, decode_responses=True,
password='ReDis!GmTx*0aN12')
while True: while True:
import pdb import pdb
pdb.set_trace() pdb.set_trace()
......
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