Commit 9fdb4122 authored by TesterYao's avatar TesterYao

1

parent f40c9153
...@@ -32,7 +32,10 @@ class SSP: ...@@ -32,7 +32,10 @@ class SSP:
def post_block_list(self, b_url): def post_block_list(self, b_url):
LOG.info('SSP上报被封域名:'+b_url) LOG.info('SSP上报被封域名:'+b_url)
r = self.session.get(url=self.host+self.block_list_url+b_url.split('https://')[1]+'&resulting=1') if b_url.startswith('http'):
r = self.session.get(url=self.host+self.block_list_url+b_url.split('https://')[1]+'&resulting=1')
else:
r = self.session.get(url=self.host + self.block_list_url + b_url + '&resulting=1')
LOG.info('上报结果:' + r.text) LOG.info('上报结果:' + r.text)
if r.status_code == 200 and r.json().get('desc') == "成功": if r.status_code == 200 and r.json().get('desc') == "成功":
LOG.info('上报成功:'+ r.text) LOG.info('上报成功:'+ r.text)
......
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