代码拉取完成,页面将自动刷新
# -*- coding: utf-8 -*-
# @Time : 2020/8/7 13:46
# @Description:
# @Author : YanQiang
# @Email : 18988775754@163.com
# @File : base64解密.py
import base64
from datetime import datetime
import requests
a = 'aHR0cDovL3ljLndzd2oubmV0L2Foc3h4L0xPTC9wdWJsaWMvcHVibGljLmh0bWw='
res = base64.b64decode(a)
s = str(res, encoding="utf-8")
print(res)
print(s)
HEADERS = {
'Accept': 'application/json, text/javascript, */*; q=0.',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Origin': 'http://yc.wswj.net',
'Referer': 'http://yc.wswj.net/ahsxx/LOL/public/rain.html',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36'
}
def get_post(url):
data = {
'time': '',
'hourClass': '2.1LDEsMiwzLDYyMQ==',
'name': '2.1ZVNlbHRjYVJuaWFXbnJuSW9m',
'snsw': '2.1bnM=',
'waterEncode': '2.1cnRldQ==',
'random': '0.5908486321928954'
}
response = requests.post(url=url, data=data, headers=HEADERS)
print(response.text)
def get_time():
date = datetime.now()
timeStr = str(date).split(':')[0]
res = timeStr.split(' ')
if res[-1][0] == 0:
res2 = int(res[-1][-1]) + 1
else:
res2 = int(res[-1]) + 1
timeParam = res[0].replace("-","") + str(res2*100)
return timeParam
js_data = {
"name": "GetSwInfo",
"time": get_time(),
'fresh': 0,
"waterEncode": 'true'
}
if __name__ == '__main__':
url = 'http://61.191.22.196:5566/ahsxx/service/PublicBusinessHandler.ashx'
# get_post(url)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。