Commit 6e5c5a8f authored by litaolemo's avatar litaolemo

update

parent 0fe0b5ab
No related merge requests found
......@@ -71,7 +71,7 @@ parser.add_argument('-name', '--name', default="crawler01", type=str,
help=('this computer name'))
args = parser.parse_args()
rds_save = redis.StrictRedis(host='172.16.40.164', port=6379, db=20, decode_responses=True, password='ReDis!GmTx*0aN12')
rds_save = redis.StrictRedis(host='172.18.51.10', port=6379, db=20, 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 = {
......
......@@ -127,6 +127,7 @@ class Crawler_weibo():
except:
get_page = None
has_more = False
print(get_page.text)
if get_page and get_page.status_code == 200:
try:
page_json = get_page.json()
......@@ -330,7 +331,7 @@ if __name__ == '__main__':
]
import redis
rds = redis.StrictRedis(host='172.18.51.10', port=6379, db=17, decode_responses=True)
rds = redis.StrictRedis(host='172.18.51.10', port=6379, db=20, decode_responses=True)
for url in url_list:
res = test.releaser_page(url, output_to_es_raw=True,
es_index='crawler-data-raw',
......
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