Commit b034b62e authored by TesterYao's avatar TesterYao

1

parent 544f06a8
...@@ -18,7 +18,7 @@ def check_domain(check_url,i=0): ...@@ -18,7 +18,7 @@ def check_domain(check_url,i=0):
gj_url = 'https://'+ check_url gj_url = 'https://'+ check_url
url = base_url + gj_url url = base_url + gj_url
LOG.info('开始巡查,域名为:%s' % check_url) LOG.info('广告主开始巡查,域名为:%s' % check_url)
r = session.get(url=url,headers=headers,timeout=5) # 调用微信官方接口进行域名巡查 r = session.get(url=url,headers=headers,timeout=5) # 调用微信官方接口进行域名巡查
res_url = r.url # 获取最终的url,如果被封,则应该是微信安全中心的链接 res_url = r.url # 获取最终的url,如果被封,则应该是微信安全中心的链接
LOG.info('巡查最终打开页面链接:%s' % res_url) # 将url打印出来,便于后期排查问题 LOG.info('巡查最终打开页面链接:%s' % res_url) # 将url打印出来,便于后期排查问题
...@@ -46,11 +46,14 @@ if __name__ == '__main__': ...@@ -46,11 +46,14 @@ if __name__ == '__main__':
base_url = 'http://mp.weixinbridge.com/mp/wapredirect?url=' # 微信官方接口,可用于域名巡查,后面拼接上需要巡查的域名或链接 base_url = 'http://mp.weixinbridge.com/mp/wapredirect?url=' # 微信官方接口,可用于域名巡查,后面拼接上需要巡查的域名或链接
session = requests.session() session = requests.session()
headers = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36'} headers = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36'}
ck_url_list = ['po.sxyddc555.cn/site/danding/wxpayment.html'] ck_url_list = ['po.sxyddc555.cn/site/danding/wxpayment.html','web.sgwd188.com/landingPage/getGiftV2022804_01_29_new_jsapi_q?channelCode=u155ha',
'web.sgwd188.com/','po.sxyddc555.cn'
]
while True: while True:
for ck_url in ck_url_list: for ck_url in ck_url_list:
check_domain(ck_url) check_domain(ck_url)
sleep(20) sleep(2)
sleep(10)
......
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