import requests
import time
import json
import socket
import http.server
class WebRequestHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
if self.path == '/test':
cookies = {
'Hm_lvt_f96a3b24d4fa85575d9eb1470afc76da': '1722567526',
'HMACCOUNT': '60F163B849219F1A',
'sensorsdata2015jssdkcross': '%7B%22distinct_id%22%3A%221832314575147%22%2C%22first_id%22%3A%221909b37e5c8c12-02d7e597a22b1f8-26001951-1327104-1909b37e5c9143c%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkwOWIzN2U1YzhjMTItMDJkN2U1OTdhMjJiMWY4LTI2MDAxOTUxLTEzMjcxMDQtMTkwOWIzN2U1YzkxNDNjIiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiMTgzMjMxNDU3NTE0NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%221832314575147%22%7D%2C%22%24device_id%22%3A%221909f9a1bfa988-005a09f91dfd54c4-26001951-1327104-1909f9a1bfbb14%22%7D',
'Hm_lpvt_f96a3b24d4fa85575d9eb1470afc76da': '1722590644',
}
headers = {
'authority': 'ysz-video.yxj.org.cn',
'accept': '*/*',
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
# 'cookie': 'Hm_lvt_f96a3b24d4fa85575d9eb1470afc76da=1722567526; HMACCOUNT=60F163B849219F1A; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%221832314575147%22%2C%22first_id%22%3A%221909b37e5c8c12-02d7e597a22b1f8-26001951-1327104-1909b37e5c9143c%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkwOWIzN2U1YzhjMTItMDJkN2U1OTdhMjJiMWY4LTI2MDAxOTUxLTEzMjcxMDQtMTkwOWIzN2U1YzkxNDNjIiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiMTgzMjMxNDU3NTE0NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%221832314575147%22%7D%2C%22%24device_id%22%3A%221909f9a1bfa988-005a09f91dfd54c4-26001951-1327104-1909f9a1bfbb14%22%7D; Hm_lpvt_f96a3b24d4fa85575d9eb1470afc76da=1722590644',
'if-range': '"lgHl4_1Qz_PNPLqSBS36aet8Zb19"',
'range': 'bytes=42139648-43016874',
'referer': 'https://www.yxj.org.cn/',
'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'video',
'sec-fetch-mode': 'no-cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
}
response = requests.get('https://ysz-video.yxj.org.cn/kzq7j0fxl00.mp4', cookies=cookies, headers=headers)
self.send_response(200)
self.send_header('Content-type', 'text/plain')
self.send_header('Access-Control-Allow-Origin', '*')
self.end_headers()
self.wfile.write(bytes(response.text, "utf8"))
if self.path == '/master':
url = 'https://api2.bybit.com/fapi/beehive/public/v1/common/position/list?timeStamp=1710728471396&leaderMark=gOcW%2B8g7p%2FRB08VKM7deNQ%3D%3D'
headers = {
'Cookie': '_abck=92A2C1C8B8BB82268A3A9912454D2430~-1~YAAQzjDUFy6oiTqOAQAAWUBiTwuq2AROZiNiZI0ARWkSRgjUCCoerlObK20gigZNnmzeKm2hoH742ISZZYA81rzNwMjH0XZzWpM79w2IeCKZon4eLqR45u0bWmSKYDBgnGRPaTuDyaIDZ5rg5SwG4C0VIc6hXOhT0ktAJide71rguKtw+5iMNm3hqdURAuT5FgHuwMugNtcfdnyV2UfPP8X6suPrZonsZchtI4RRAuxN5U4QffRRTe7hxgC8JciiYmBIB8uriud8D9sD1bfzopqcTlKBnkiDh3+P4Tj6yIxiImQixbB7X7imCDHafEuOwZKgC69qFHb/FOh4X/zOcykwv8SPNcYTSbFh67XnPu3Nbcl/MTRZ4okyHA==~-1~-1~-1; bm_sz=8BF49965F2195031648859BB66BF96DB~YAAQzjDUFzCoiTqOAQAAWUBiTxfW5S1fXToe5rNN6BQFWv5EwzPvyjJIBHMxEkyNsDFutRw0jCcN8V+a+c9jAmBPAyB1YVKn07yMp/oFO+xLIHHZYHGpBWHP4IepkeZHS4DD7PpPcHtwjiVKqcj71yjHWzs4BLYEJS3M2l9/ihwzcquyiZsEYl4YYm4pkDcyfjAzco3RlTqytNDUkt/aHDddvz+DCw6yHDZ0dTCXNOt5O0e/ISaRQ6Vh36H4NurlF5o2W8u5ZDI/Jc4T88et8jfER0zVzgpdKTHbX4f6xI+BBn/OKgKOWz0Ni+VDY2Xe2Q9NWMUhU1KQ8NkyuuVKsYBMb8ROyf6//9xlZlAnQlEG9mwcBLg=~4403525~3356978',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.9999.999 Safari/537.36'
}
response = requests.get(url, headers=headers)
print(type(response.text))
self.send_response(200)
self.send_header('Content-type', 'text/plain')
self.send_header('Access-Control-Allow-Origin', '*')
self.end_headers()
self.wfile.write(bytes(response.text, "utf8"))
if self.path == '/pontiac':
url = 'https://api2.bybit.com/fapi/beehive/public/v1/common/position/list?timeStamp=1711440911301&leaderMark=s%2FICUOATlN9LxTh7Bpnq1g%3D%3D'
headers = {
'Cookie': '_abck=92A2C1C8B8BB82268A3A9912454D2430~-1~YAAQzjDUFy6oiTqOAQAAWUBiTwuq2AROZiNiZI0ARWkSRgjUCCoerlObK20gigZNnmzeKm2hoH742ISZZYA81rzNwMjH0XZzWpM79w2IeCKZon4eLqR45u0bWmSKYDBgnGRPaTuDyaIDZ5rg5SwG4C0VIc6hXOhT0ktAJide71rguKtw+5iMNm3hqdURAuT5FgHuwMugNtcfdnyV2UfPP8X6suPrZonsZchtI4RRAuxN5U4QffRRTe7hxgC8JciiYmBIB8uriud8D9sD1bfzopqcTlKBnkiDh3+P4Tj6yIxiImQixbB7X7imCDHafEuOwZKgC69qFHb/FOh4X/zOcykwv8SPNcYTSbFh67XnPu3Nbcl/MTRZ4okyHA==~-1~-1~-1; bm_sz=8BF49965F2195031648859BB66BF96DB~YAAQzjDUFzCoiTqOAQAAWUBiTxfW5S1fXToe5rNN6BQFWv5EwzPvyjJIBHMxEkyNsDFutRw0jCcN8V+a+c9jAmBPAyB1YVKn07yMp/oFO+xLIHHZYHGpBWHP4IepkeZHS4DD7PpPcHtwjiVKqcj71yjHWzs4BLYEJS3M2l9/ihwzcquyiZsEYl4YYm4pkDcyfjAzco3RlTqytNDUkt/aHDddvz+DCw6yHDZ0dTCXNOt5O0e/ISaRQ6Vh36H4NurlF5o2W8u5ZDI/Jc4T88et8jfER0zVzgpdKTHbX4f6xI+BBn/OKgKOWz0Ni+VDY2Xe2Q9NWMUhU1KQ8NkyuuVKsYBMb8ROyf6//9xlZlAnQlEG9mwcBLg=~4403525~3356978',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.9999.999 Safari/537.36'
}
response = requests.get(url, headers=headers)
print(type(response.text))
self.send_response(200)
self.send_header('Content-type', 'text/plain')
self.send_header('Access-Control-Allow-Origin', '*')
self.end_headers()
self.wfile.write(bytes(response.text, "utf8"))
if self.path == '/pino':
url = 'https://api2.bybit.com/fapi/beehive/public/v1/common/position/list?timeStamp=1721609571884&leaderMark=mvDXJInnmORhCPuDht%2BxdA%3D%3D'
headers = {
'Cookie': '_abck=92A2C1C8B8BB82268A3A9912454D2430~-1~YAAQzjDUFy6oiTqOAQAAWUBiTwuq2AROZiNiZI0ARWkSRgjUCCoerlObK20gigZNnmzeKm2hoH742ISZZYA81rzNwMjH0XZzWpM79w2IeCKZon4eLqR45u0bWmSKYDBgnGRPaTuDyaIDZ5rg5SwG4C0VIc6hXOhT0ktAJide71rguKtw+5iMNm3hqdURAuT5FgHuwMugNtcfdnyV2UfPP8X6suPrZonsZchtI4RRAuxN5U4QffRRTe7hxgC8JciiYmBIB8uriud8D9sD1bfzopqcTlKBnkiDh3+P4Tj6yIxiImQixbB7X7imCDHafEuOwZKgC69qFHb/FOh4X/zOcykwv8SPNcYTSbFh67XnPu3Nbcl/MTRZ4okyHA==~-1~-1~-1; bm_sz=8BF49965F2195031648859BB66BF96DB~YAAQzjDUFzCoiTqOAQAAWUBiTxfW5S1fXToe5rNN6BQFWv5EwzPvyjJIBHMxEkyNsDFutRw0jCcN8V+a+c9jAmBPAyB1YVKn07yMp/oFO+xLIHHZYHGpBWHP4IepkeZHS4DD7PpPcHtwjiVKqcj71yjHWzs4BLYEJS3M2l9/ihwzcquyiZsEYl4YYm4pkDcyfjAzco3RlTqytNDUkt/aHDddvz+DCw6yHDZ0dTCXNOt5O0e/ISaRQ6Vh36H4NurlF5o2W8u5ZDI/Jc4T88et8jfER0zVzgpdKTHbX4f6xI+BBn/OKgKOWz0Ni+VDY2Xe2Q9NWMUhU1KQ8NkyuuVKsYBMb8ROyf6//9xlZlAnQlEG9mwcBLg=~4403525~3356978',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.9999.999 Safari/537.36'
}
response = requests.get(url, headers=headers)
print(
csbysj2020
- 粉丝: 2752
- 资源: 5562
最新资源
- Python爬虫案例,处理动态加载的内容,保存数据到SQLite数据库
- 空中俯视物体检测15-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord数据集合集.rar
- 基于前端Vue后端.NetCore Web后台管理系统通用开本框架采用前后端分离技术,前端使用vue2.6.0,后端使用.netcore3.1,支持跨平台、多租户、支持MySQL SQLServer
- html+css网页设计 美食 餐饮杰12个页面
- 2024级涉外护理7班马天爱劳动实践总结1.docx
- 基于纯verilogFPGA的双线性差值视频缩放 功能:利用双线性差值算法,pc端HDMI输入视频缩小或放大,然后再通过HDMI输出显示,可以任意缩放 缩放模块仅含有ddr ip,手写了 ram,f
- obsidian笔记软件常用插件离线包
- 【机器学习进阶】PyTorch CIFAR-10 训练与结果保存
- 文心快码 - Baidu Comate
- 大白菜病害图像数据集(2900张图片).rar
- DenseNet卷积神经网络网络【121,161,169,201四种版本】实现的图像识别项目实战:多类别鸟品种分类
- 基于PHP语言的图书管理系统,包括添加、删除、查询和更新图书信息的功能
- 2024级涉外护理7班马天爱劳动实践总结2.docx
- 基于Matlab实现BUCK仿真(程序).rar
- OpenGL使用TransformFeedback实现粒子效果
- 空中俯视物体检测16-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord数据集合集.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈