🎥 全新升级 - 智能广告过滤网页播放器，畅享纯净观影体验！购买地址：初心杂货铺 互联网视频内容丰富，但广告频繁插播，严重影响了观影体验。为了解决这一痛点，我们推出了全新的智能广告过滤播放器，让你轻松告别片头广告和无聊插播，只专注于你想看的内容。🔥 为什么选择这款播放器？随着在线视频的发展，广告时长和频次也越来越高。传统播放器常常让用户忍受：开头长时间的片头广告中间反复插入的广告片段无法跳过的强制广告我们的播放器在此基础上引入智能广告过滤技术，自动识别并跳过广告内容，无需用户手动快进，带来前所未有的流畅观影体验。🌟 核心功能介绍1. 智能广告自动过滤全自动识别视频流中的广告片段，包括片头广告、插播广告、以及其他干扰内容过滤过程无缝衔接，跳过广告不影响视频连续性和画质不影响正常视频播放，确保观影体验纯净无忧2. 多格式视频支持兼容 .m3u8(HLS)、.flv(Flash)、.mpd(DASH)主流流媒体格式适配各种在线视频平台和私有视频资源，支持多样化播放需求3. 跨平台兼容，随时随地观影支持主流桌面浏览器 (Chrome、Firefox、Edge)适配移动端浏览器 (Android、iOS)响应式界面设计，自动调整屏幕尺寸和布局，保证手机和平板端观看体验4. 现代化播放器 UI简洁美观，支持亮暗主题自由切换支持截图、倍速播放、快进快退、画面翻转等高级功能支持悬浮小窗（画中画）播放，提升多任务操作体验5. 贴心用户交互提示播放器初始化时提示“广告过滤已开启”，让你随时掌握状态硬件加速状态检测，自动启用优化播放性能异常播放自动修复，减少卡顿和崩溃💡 适用场景举例个人观影：无论是喜欢追剧、看电影还是短视频，都能畅享无广告干扰的观看体验教育培训：避免教学视频被广告打断，保证学习连贯性内容创作：视频创作者可嵌入播放器，提升用户体验和留存率企业展示：企业宣传片播放更专业，不被广告侵扰🎯 未来展望我们正在不断完善广告过滤算法，未来将加入：智能跳广告时长显示，让用户了解跳过的广告时间自定义广告过滤规则，支持用户手动添加关键词或白名单多语言支持，覆盖更广泛用户群播放数据统计与分析，帮助内容提供方更好优化视频体验🚀 立即体验体验网址：Mvideo 打开网页，视频自动加载并播放，广告自动跳过，即刻享受纯净视听盛宴！🙋 常见问题Q1：播放器支持哪些视频格式？ A1：目前支持 HLS (.m3u8)、FLV (.flv)、DASH (.mpd)三大主流格式。Q2：广告过滤会不会误杀正片内容？ A2：过滤逻辑经过多轮优化，尽可能保证仅跳过广告片段，不影响正片内容。Q3：需要安装额外插件或扩展吗？ A3：完全不需要，所有功能均集成在播放器内部，打开即可使用。🙌 结语广告虽然是内容平台的重要收入来源，但用户体验同样重要。我们希望通过这款智能广告过滤播放器，让你重新找回纯粹、流畅、舒适的观影感受。未来，我们将持续投入优化，让每一位观众都能享受更美好的视频时光。感谢关注，欢迎分享和反馈！ 祝观影愉快！🎉
<?php // error_reporting(0); header("Access-Control-Allow-Origin:*"); header('Content-type:text/json; charset=utf-8'); $user = '小米运动帐号'; $pwd = '小米运动密码'; $steps = 66666; // 要刷的步数 $code = access_code($user, $pwd); if (strlen($code) > 3) { $tokenjson = login_token($code); $login_token = $tokenjson['token_info']['login_token']; $user_id = $tokenjson['token_info']['user_id']; $appjson = get_app_token($login_token); $user_id = $appjson['token_info']['user_id']; $app_token = $appjson['token_info']['app_token']; $t = get_time(); $time = date("Y-m-d", time()); $data_json = data_json($time, $steps); $res = change_steps($t, $user_id, $app_token, $data_json); echo $res; } else { exit("登录失败"); } exit(); function access_code($user, $pwd) { $url = "https://api-user.huami.com/registrations/+86{$user}/tokens"; $header = ["Content-Type " => "application/x-www-form-urlencoded;charset=UTF-8"]; $post_data = array( "client_id" => "HuaMi", "password" => $pwd, "redirect_uri" => "https://s3-us-west-2.amazonaws.com/hm-registration/successsignin.html", "token" => "access" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_USERAGENT, "MiFit/4.6.0 (iPhone; iOS 14.0.1; Scale/2.00)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_HEADER, true); $output = curl_exec($ch); preg_match_all('/access=(.*?)&country_code/i', $output, $out); curl_close($ch); return $out[1][0]; } function login_token($code) { $url = "https://account.huami.com/v2/client/login"; $header = ["Content-Type " => "application/x-www-form-urlencoded;charset=UTF-8"]; $post_data = array( "app_name" => "com.xiaomi.hm.health", "app_version" => "4.6.0", "code" => $code, "country_code" => "CN", "device_id" => "2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1", "device_model" => "phone", "grant_type" => "access_token", "third_name" => "huami_phone" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_USERAGENT, "MiFit/4.6.0 (iPhone; iOS 14.0.1; Scale/2.00)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data)); $output = curl_exec($ch); curl_close($ch); return json_decode($output, true); } function get_time() { $url = "http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $output = curl_exec($ch); curl_close($ch); return json_decode($output, true)['data']['t']; } function get_app_token($login_token) { $url = "https://account-cn.huami.com/v1/client/app_tokens?app_name=com.xiaomi.hm.health&dn=api-user.huami.com%2Capi-mifit.huami.com%2Capp-analytics.huami.com&login_token={$login_token}&os_version=4.1.0"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, "MiFit/4.6.0 (iPhone; iOS 14.0.1; Scale/2.00)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $output = curl_exec($ch); curl_close($ch); return json_decode($output, true); } function data_json($time, $steps) { $datas = '[{"summary":"{\"slp\":{\"ss\":73,\"lt\":304,\"dt\":0,\"st\":1589920140,\"lb\":36,\"dp\":92,\"is\":208,\"rhr\":0,\"stage\":[{\"start\":269,\"stop\":357,\"mode\":2},{\"start\":358,\"stop\":380,\"mode\":3},{\"start\":381,\"stop\":407,\"mode\":2},{\"start\":408,\"stop\":423,\"mode\":3},{\"start\":424,\"stop\":488,\"mode\":2},{\"start\":489,\"stop\":502,\"mode\":3},{\"start\":503,\"stop\":512,\"mode\":2},{\"start\":513,\"stop\":522,\"mode\":3},{\"start\":523,\"stop\":568,\"mode\":2},{\"start\":569,\"stop\":581,\"mode\":3},{\"start\":582,\"stop\":638,\"mode\":2},{\"start\":639,\"stop\":654,\"mode\":3},{\"start\":655,\"stop\":665,\"mode\":2}],\"ed\":1589943900,\"wk\":0,\"wc\":0},\"tz\":\"28800\",\"stp\":{\"runCal\":1,\"cal\":6,\"conAct\":0,\"stage\":[],\"ttl\":' . $steps . ',\"dis\":144,\"rn\":0,\"wk\":5,\"runDist\":4,\"ncal\":0},\"v\":5,\"goal\":8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/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+","summary_hr":"{\"ct\":0,\"id\":[]}","date":"' . $time . '"}]'; return $datas; } function change_steps($t, $user_id, $app_token, $data_json) { $url = "https://api-mifit-cn.huami.com/v1/data/band_data.json?&t={$t}"; // $header = ["Content-Type " => "application/x-www-form-urlencoded;charset=UTF-8"]; $header = ["apptoken" => $app_token]; $post_data = array( "data_json" => $data_json, "userid" => $user_id, "device_type" => "0", "last_sync_data_time" => "1589917081", "last_deviceid" => "DA932FFFFE8816E7" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.12(0x17000c2d) NetType/WIFI Language/zh_CN"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $output = curl_exec($ch); curl_close($ch); // return json_decode($output, true); return $output; } ?>import requests import re import random import time import datetime def get_time_stamp(): r""" 获取时间戳，例如：1682583902000 :return: 时间戳 """ url = 'http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp' response = requests.get(url).json() t = response['data']['t'] return t def loginGetCode(user, password): r"""1、登录获取Code :param user: 账号：邮箱/手机号 :param password: 密码 :return: is_phone, location """ is_phone = True if "@" in user: is_phone = False url_user = user else: url_user = f"+86{user}" url = "https://api-user.huami.com/registrations/" + url_user + "/tokens" data = { "client_id": "HuaMi", "password": f"{password}", "redirect_uri": "https://s3-us-west-2.amazonaws.com/hm-registration/successsignin.html", "token": "access" } headers = { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2" } r1 = requests.post(url, data=data, headers=headers, allow_redirects=False) location = r1.headers["Location"] try: code_pattern = re.compile("(?<=access=).*?(?=&)") code = code_pattern.findall(location)[0] print("location:"+location) print("code:"+code) except: return 0, 0 return is_phone, code def getLoginToken(code, is_phone): r"""2、获取login_token :param code: code :param is_phone: 是否手机号 :return: login_token, userid """ url = "https://account.huami.com/v2/client/login" if is_phone: data = { "app_name": "com.xiaomi.hm.health", "app_version": "4.6.0", "code": f"{code}", "country_code": "CN", "device_id": "2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1", "device_model": "phone", "grant_type": "access_token", "third_name": "huami_phone", } else: data = { "allow_registration=": "false", "app_name": "com.xiaomi.hm.health", "app_version": "6.3.5", "code": f"{code}", "country_code": "CN", "device_id": "2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1", "device_model": "phone", "dn": "api-user.huami.com%2Capi-mifit.huami.com%2Capp-analytics.huami.com", "grant_type": "access_token", "lang": "zh_CN", "os_version": "1.5.0", "source": "com.xiaomi.hm.health", "third_name": "email", } headers = { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2" } r2 = requests.post(url, data=data,headers=headers).json() login_token = r2["token_info"]["login_token"] userid = r2["token_info"]["user_id"] return login_token, userid def getAppToken(login_token): r"""3、获取app_token :param login_token: login_token :return: app_token """ url = f"https://account-cn.huami.com/v1/client/app_tokens?app_name=com.xiaomi.hm.health&dn=api-user.huami.com%2Capi-mifit.huami.com%2Capp-analytics.huami.com&login_token={login_token}" response = requests.get(url).json() app_token = response['token_info']['app_token'] return app_token def brushStep(app_token, user_id, step): r"""4、刷步数 :param app_token: login_token :param user_id: 用户id :param step: 步数 :return: 成功返回True,成功/失败的 message """ data_json = '%5B%7B%22data_hr%22%3A%22%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9L%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FVv%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0v%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9e%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0n%5C%2Fa%5C%2F%5C%2F%5C%2FS%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0b%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F1FK%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FR%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F9PTFFpaf9L%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2FR%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F%5C%2F0j%5C%2F%5C%2F%5C%2F%5C%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v7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%5C%2Fv7%2B%22%2C%22date%22%3A%222021-08-07%22%2C%22data%22%3A%5B%7B%22start%22%3A0%2C%22stop%22%3A1439%2C%22value%22%3A%[binary]%22%2C%22tz%22%3A32%2C%22did%22%3A%22DA932FFFFE8816E7%22%2C%22src%22%3A24%7D%5D%2C%22summary%22%3A%22%7B%5C%22v%5C%22%3A6%2C%5C%22slp%5C%22%3A%7B%5C%22st%5C%22%3A1628296479%2C%5C%22ed%5C%22%3A1628296479%2C%5C%22dp%5C%22%3A0%2C%5C%22lt%5C%22%3A0%2C%5C%22wk%5C%22%3A0%2C%5C%22usrSt%5C%22%3A-1440%2C%5C%22usrEd%5C%22%3A-1440%2C%5C%22wc%5C%22%3A0%2C%5C%22is%5C%22%3A0%2C%5C%22lb%5C%22%3A0%2C%5C%22to%5C%22%3A0%2C%5C%22dt%5C%22%3A0%2C%5C%22rhr%5C%22%3A0%2C%5C%22ss%5C%22%3A0%7D%2C%5C%22stp%5C%22%3A%7B%5C%22ttl%5C%22%3A18272%2C%5C%22dis%5C%22%3A10627%2C%5C%22cal%5C%22%3A510%2C%5C%22wk%5C%22%3A41%2C%5C%22rn%5C%22%3A50%2C%5C%22runDist%5C%22%3A7654%2C%5C%22runCal%5C%22%3A397%2C%5C%22stage%5C%22%3A%5B%7B%5C%22start%5C%22%3A327%2C%5C%22stop%5C%22%3A341%2C%5C%22mode%5C%22%3A1%2C%5C%22dis%5C%22%3A481%2C%5C%22cal%5C%22%3A13%2C%5C%22step%5C%22%3A680%7D%2C%7B%5C%22start%5C%22%3A342%2C%5C%22stop%5C%22%3A367%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A2295%2C%5C%22cal%5C%22%3A95%2C%5C%22step%5C%22%3A2874%7D%2C%7B%5C%22start%5C%22%3A368%2C%5C%22stop%5C%22%3A377%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A1592%2C%5C%22cal%5C%22%3A88%2C%5C%22step%5C%22%3A1664%7D%2C%7B%5C%22start%5C%22%3A378%2C%5C%22stop%5C%22%3A386%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A1072%2C%5C%22cal%5C%22%3A51%2C%5C%22step%5C%22%3A1245%7D%2C%7B%5C%22start%5C%22%3A387%2C%5C%22stop%5C%22%3A393%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A1036%2C%5C%22cal%5C%22%3A57%2C%5C%22step%5C%22%3A1124%7D%2C%7B%5C%22start%5C%22%3A394%2C%5C%22stop%5C%22%3A398%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A488%2C%5C%22cal%5C%22%3A19%2C%5C%22step%5C%22%3A607%7D%2C%7B%5C%22start%5C%22%3A399%2C%5C%22stop%5C%22%3A414%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A2220%2C%5C%22cal%5C%22%3A120%2C%5C%22step%5C%22%3A2371%7D%2C%7B%5C%22start%5C%22%3A415%2C%5C%22stop%5C%22%3A427%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A1268%2C%5C%22cal%5C%22%3A59%2C%5C%22step%5C%22%3A1489%7D%2C%7B%5C%22start%5C%22%3A428%2C%5C%22stop%5C%22%3A433%2C%5C%22mode%5C%22%3A1%2C%5C%22dis%5C%22%3A152%2C%5C%22cal%5C%22%3A4%2C%5C%22step%5C%22%3A238%7D%2C%7B%5C%22start%5C%22%3A434%2C%5C%22stop%5C%22%3A444%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A2295%2C%5C%22cal%5C%22%3A95%2C%5C%22step%5C%22%3A2874%7D%2C%7B%5C%22start%5C%22%3A445%2C%5C%22stop%5C%22%3A455%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A1592%2C%5C%22cal%5C%22%3A88%2C%5C%22step%5C%22%3A1664%7D%2C%7B%5C%22start%5C%22%3A456%2C%5C%22stop%5C%22%3A466%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A1072%2C%5C%22cal%5C%22%3A51%2C%5C%22step%5C%22%3A1245%7D%2C%7B%5C%22start%5C%22%3A467%2C%5C%22stop%5C%22%3A477%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A1036%2C%5C%22cal%5C%22%3A57%2C%5C%22step%5C%22%3A1124%7D%2C%7B%5C%22start%5C%22%3A478%2C%5C%22stop%5C%22%3A488%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A488%2C%5C%22cal%5C%22%3A19%2C%5C%22step%5C%22%3A607%7D%2C%7B%5C%22start%5C%22%3A489%2C%5C%22stop%5C%22%3A499%2C%5C%22mode%5C%22%3A4%2C%5C%22dis%5C%22%3A2220%2C%5C%22cal%5C%22%3A120%2C%5C%22step%5C%22%3A2371%7D%2C%7B%5C%22start%5C%22%3A500%2C%5C%22stop%5C%22%3A511%2C%5C%22mode%5C%22%3A3%2C%5C%22dis%5C%22%3A1268%2C%5C%22cal%5C%22%3A59%2C%5C%22step%5C%22%3A1489%7D%2C%7B%5C%22start%5C%22%3A512%2C%5C%22stop%5C%22%3A522%2C%5C%22mode%5C%22%3A1%2C%5C%22dis%5C%22%3A152%2C%5C%22cal%5C%22%3A4%2C%5C%22step%5C%22%3A238%7D%5D%7D%2C%5C%22goal%5C%22%3A8000%2C%5C%22tz%5C%22%3A%5C%2228800%5C%22%7D%22%2C%22source%22%3A24%2C%22type%22%3A0%7D%5D' finddate = re.compile(r".*?date%22%3A%22(.*?)%22%2C%22data.*?") findstep = re.compile(r".*?ttl%5C%22%3A(.*?)%2C%5C%22dis.*?") today = time.strftime("%F") data_json = re.sub(finddate.findall(data_json)[0], today, str(data_json)) data_json = re.sub(findstep.findall(data_json)[0], step, str(data_json)) t = get_time_stamp() url = f'https://api-mifit-cn.huami.com/v1/data/band_data.json?&t={t}' head = { "apptoken": app_token, "Content-Type": "application/x-www-form-urlencoded" } data = f'userid={user_id}&last_sync_data_time=1597306380&device_type=0&last_deviceid=DA932FFFFE8816E7&data_json={data_json}' response = requests.post(url, data=data, headers=head).json() if response['code'] == 1: return True, response['message'] else: return False, response['message'] def main(_user, _password, _step_min, _step_max): #_user zepp注册的邮箱 #_password zepp注册密码 #_step_min 刷步数随机取值范围的下限 #_step_max 刷步数随机取值范围的上限 user = str(_user) password = str(_password) step = str(random.randint(_step_min, _step_max)) print(step) if user == '' or password == '': return "请正确填写用户名或密码" # 获取code is_phone, code = loginGetCode(user, password) if code == 0: return "登录失败" # 获取login_token login_token, userid = getLoginToken(code, is_phone) # 获取App_token app_token = getAppToken(login_token) # 刷步数 brush, message = brushStep(app_token, userid, step) time_bj = datetime.datetime.today() now = time_bj.strftime("%Y-%m-%d %H:%M:%S") result = f"[{now}]\n账号：{user[:3]}****{user[7:]}\n修改步数（{step}）[" + message + "]\n" print(result) return result if __name__ == "__main__": main('邮箱','密码',步数下限,步数上限)
一、创建机器人找到BotFather 打开Telegram，搜索并找到@BotFather（官方机器人创建工具）。创建新机器人 向@BotFather发送指令/newbot，按照提示完成以下步骤：输入机器人的昵称（显示名称）。设置机器人的用户名（必须以_bot或Bot结尾，且唯一）。创建成功后，@BotFather会返回一个API Token，务必妥善保存，这是控制机器人的关键。二、基础设置编辑机器人属性 通过@BotFather的指令/mybots，选择你创建的机器人，进行以下设置：名称：/setname修改显示名称。描述：/setdescription设置机器人的简短描述。头像：/setuserpic上传机器人头像。命令：/setcommands设置自定义命令列表（如/start、/help等）。配置机器人权限群组权限：通过/setjoingroups设置机器人是否可加入群组。隐私模式：通过/setprivacy设置机器人是否可读取所有群组消息（默认仅响应以/开头的命令）。三、编程实现框架代码已完成，接口文件不在此处展示！四、部署与测试本地测试使用getUpdates方法轮询消息，适合本地调试。运行代码后，向机器人发送消息，检查是否正常响应。Webhook部署准备一个支持HTTPS的服务器（如Google Cloud或Heroku）。设置Webhook URL：通过API setWebhook将机器人绑定到服务器的回调地址。https://api.telegram.org/bot<token>/setWebhook?url=<your_server_url>
为了确保接口的返回格式统一且易于维护，我整理了一些通用的响应格式和状态码规范。这些笔记不仅帮助我在开发过程中保持一致性，也便于后续的调试和维护。设置响应头每个API的响应头可以统一设置如下，以确保跨域访问和正确的内容类型：header('Access-Control-Allow-Origin: *'); // 允许所有来源访问 header('Access-Control-Allow-Methods: POST, GET'); // 允许的访问方法 header('Content-type: application/json;charset=utf-8'); // 设置响应头编码为UTF-8JSON格式化为了确保JSON数据的可读性和一致性，可以使用 json_encode 的以下选项：$options = JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES; echo json_encode($response, $options);JSON_NUMERIC_CHECK：将所有数字字符串转换为数字。JSON_PRETTY_PRINT：格式化JSON，便于阅读。JSON_UNESCAPED_UNICODE：不对中文字符进行转义。JSON_UNESCAPED_SLASHES：不对斜杠进行转义。常见HTTP状态码在处理HTTP请求时，以下是一些常见的状态码及其说明：200：请求成功，表示服务器成功处理了请求。400：请求错误，比如参数错误或请求格式不正确。401：未授权，通常指用户未提供有效的身份验证信息。403：禁止访问，用户没有权限访问该资源。404：资源未找到，表示请求的API端点不存在。BaseResponse响应格式为了使API响应格式保持一致，可以使用一个通用的 BaseResponse 函数：function BaseResponse($code, $message, $data = []) { $response = [ 'code' => $code, 'message' => $message, 'data' => $data ]; // 设置响应头 header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST, GET'); header('Content-type: application/json;charset=utf-8'); // 输出JSON echo json_encode($response, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); exit(); }接口文档规范编写接口文档时，可以按照以下结构进行描述：接口标题：简要描述接口的功能。接口描述：详细说明接口的作用。请求方法：例如 POST 或 GET。请求URL：接口的访问地址。请求参数：参数名、类型、是否必填、说明返回参数：参数名、类型、说明
<?php function getInitialTheme() { if (isset($_COOKIE['theme_preference'])) { return $_COOKIE['theme_preference'] === 'dark' ? 'dark' : 'light'; } if (isset($_SERVER['HTTP_ACCEPT'])) { $accept = $_SERVER['HTTP_ACCEPT']; if (strpos($accept, 'prefers-color-scheme: dark') !== false) { return 'dark'; } } return 'light'; } $initialTheme = getInitialTheme(); $selected_source = isset($_GET['y']) ? $_GET['y'] : (isset($_COOKIE['selected_source']) ? $_COOKIE['selected_source'] : '1'); $search_query = isset($_GET['search']) ? urlencode($_GET['search']) : ''; $search_results = []; if ($search_query) { $search_url = "https://baiapi.cn/api/ysss/?apikey=密钥&y={$selected_source}&wd={$search_query}"; $search_data = @file_get_contents($search_url); if ($search_data) { $search_results = json_decode($search_data, true); } } $movie_details = null; if (isset($_GET['movie_id'])) { $details_url = "https://baiapi.cn/api/ysss/?apikey=密钥&y={$selected_source}&id=". urlencode($_GET['movie_id']); $details_data = @file_get_contents($details_url); if ($details_data) { $movie_details = json_decode($details_data, true); } } ?> <html lang="zh-CN" data-theme="<?php echo $initialTheme; ?>"> 影视搜索 <i class="<?php echo $initialTheme === 'dark' ? 'fas fa-sun' : 'fas fa-moon'; ?>"> 📢 免责声明 本站所有内容均来自互联网，本站不会保存、复制或传播任何视频文件，也不对本站上的任何内容负法律责任。如果本站部分内容侵犯您的版权请告知，在必要证明文件下我们第一时间撤除。 请勿相信视频中的任何广告！ 开源地址：GitHub 5 秒后可关闭 影视搜索 <input type="text" name="search" value="<?php echo isset($_GET['search']) ? htmlspecialchars($_GET['search']) : ''; ?>" placeholder="请输入影片名称" style="flex-grow: 1; padding: 10px 10px; font-size: 16px; border: 1px solid var(--border-color); border-radius: 5px; margin-right: 10px; background-color: var(--input-bg); color: var(--input-text);"/> <option value="1" <?php echo ($selected_source == '1') ? 'selected' : ''; ?>>片源1 <option value="2" <?php echo ($selected_source == '2') ? 'selected' : ''; ?>>片源2 <option value="3" <?php echo ($selected_source == '3') ? 'selected' : ''; ?>>片源3 <option value="4" <?php echo ($selected_source == '4') ? 'selected' : ''; ?>>片源4 <option value="5" <?php echo ($selected_source == '5') ? 'selected' : ''; ?>>片源5 <option value="6" <?php echo ($selected_source == '6') ? 'selected' : ''; ?>>片源6 搜索 <?php if (!isset($_GET['movie_id']) && isset($search_results['list']) && count($search_results['list']) > 0): ?> 🔍 搜索结果 <?php foreach ($search_results['list'] as $movie): ?> <input type="hidden" name="movie_id" value="<?php echo htmlspecialchars($movie['vod_id']); ?>"> <input type="hidden" name="search" value="<?php echo htmlspecialchars($_GET['search']); ?>"> <input type="hidden" name="y" value="<?php echo htmlspecialchars($selected_source); ?>"> <?php echo htmlspecialchars($movie['vod_name']) . ' - ' . htmlspecialchars($movie['vod_remarks']); ?> <?php endforeach; ?> <?php elseif (isset($_GET['movie_id']) && $movie_details && isset($movie_details['name'])): ?> 🎬 影片详情 导演 <?php echo htmlspecialchars($movie_details['director']); ?> 类型 <?php echo htmlspecialchars($movie_details['class']); ?> 日期 <?php echo htmlspecialchars($movie_details['pubdate']); ?> 评分 <?php echo htmlspecialchars($movie_details['douban_score']); ?> 地区 <?php echo htmlspecialchars($movie_details['area']); ?> <img src="<?php echo htmlspecialchars($movie_details['pic']); ?>" alt="<?php echo htmlspecialchars($movie_details['name']); ?>" style="max-width: 100%;"> 💬 影片简介 <?php echo $movie_details['content']; ?> 🔞 播放列表 <?php if (isset($movie_details['play_url']) && is_array($movie_details['play_url'])): ?> <?php foreach ($movie_details['play_url'] as $episode): ?> <a href="https://baiapi.cn/api/qtbfq?url=<?php echo htmlspecialchars($episode['link']); ?>" class="play-button" target="_blank"> <?php echo htmlspecialchars($episode['title']); ?> <?php endforeach; ?> <?php else: ?> 暂无播放列表。 <?php endif; ?> <?php endif; ?>
之前有人问soul如何设置怀旧头像的透明底色，看效果图！[gallery][/gallery]方法其实很简单，先设置一个你喜欢的怀旧头像(底色无所谓)，然后进入超萌捏脸捏一个临时头像保存，最后打开历史头像切换回之前使用的怀旧头像即可！步骤设置怀旧头像 > 捏临时头像 > 历史头像中切换怀旧头像
百度为了让更多的用户引入APP端，关闭了百度识图网页版查询入口。其实这个入口还是存在的，只不过百度上搜不到，通过以下网址可以进入。https://image.baidu.com/?fr=shitu
没有任何技术可言，只要利用抓包软件就可以实现，这里说的抓包并不是指http/https 协议的抓包，而是TCP/UDP 一般来说如果加密不算复杂可以完全逆向出来，这样的话能做到的权限就更大，明文的数据更好，很遗憾的是现在已经很少用明文了都是加密了的数据。抓包原理涉及到hook的知识，不管是游戏还是软件发送数据包的函数就这么几个，TCP协议使用的send、recv、WSASend、WSARecv，UDP协议使用的sendto、recvfrom、WSASendTo、WSARecvFrom。而TT语音的数据就用到了WSAend发送，可以通过hook获取到封包的数据存储然后重发和修改发送都是可以实现的，hook api还可以进行拦截失效，同理数据包也是如此。这里不过多解释，感兴趣的话可以自己去了解。BUG版本：1.7.5 ~ 1.7.8Q：为什么要抓包进自己房间？A：在其他房间发送进入自己房间的数据包，由于本地客户端不会退出，所以就停留在别人房间了。
写这个呢有两个原因，第一个原因是自己用的时候方便，第二个原因就是分享出来互相学习。模块主要包含登录、用户信息获取、频道信息获取，其他的功能后续会添加。调用简单，如果有什么不懂的可以联系我。立即购买//登录窗口 校长_用户_YY登录 () //用户信息 校长_用户_取YY号 () 校长_用户_取UID号 () 校长_用户_取登录CK () 校长_用户_取YY头像 () 校长_用户_取YY会员等级 () 校长_用户_取YY会员成长值 () 校长_用户_取YY会员每日成长值 () 校长_用户_取YY紫钻等级 () 校长_用户_取YY紫钻经验值 () 校长_用户_取YY紫钻每日经验值 () //频道信息 校长_频道_取YY频道在线人数 (“654933”) 校长_频道_取YY频道类型 (“654933”) 校长_频道_取YY频道头像 (“654933”) 校长_频道_取YY频道短位ID (“654933”) 校长_频道_取YY频道原始ID (“654933”) 校长_频道_取YY频道名称 (“654933”)