{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "70c9ccec", "metadata": {}, "outputs": [], "source": [ "import os\n", "os.add_dll_directory(os.getcwd())\n", "from pctoken import get_token\n", "from requests import get,post" ] }, { "cell_type": "code", "execution_count": 24, "id": "379f4db2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "342e75d2-dd64-4d6b-9316-da51fdce642d\n" ] } ], "source": [ "BASE_URL = \"http://192.168.0.244:9999\"\n", "data = get_token(BASE_URL, \"admin\", \"123456\")\n", "TOKEN = data.get(\"access_token\", \"\")\n", "print(TOKEN)\n", "headers = {\n", " \"Authorization\": f\"Bearer {TOKEN}\",\n", " \"hx-client\": \"hongxapp\",\n", "}" ] }, { "cell_type": "code", "execution_count": 31, "id": "820f6d23", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'{\"timestamp\":\"2026-02-27 15:36:51\",\"status\":500,\"error\":\"Internal Server Error\",\"path\":\"/videoInfoStream/page\"}'" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "headers = {\n", " \"Authorization\": f\"Bearer {TOKEN}\",\n", " \"HX-CLIENT\": \"hongxapp\",\n", " 'H-SV-CODE':'video',\n", " 'Host': '192.168.0.111:5173',\n", " 'Referer': 'http://192.168.0.111:5173/'\n", "}\n", "get( \" http://192.168.0.244:9999/video/videoInfoStream/page?current=1&size=10&descs=&ascs=\",headers=headers).text" ] }, { "cell_type": "code", "execution_count": null, "id": "2c7227e6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'{\"timestamp\":\"2026-02-27 15:34:24\",\"status\":500,\"error\":\"Internal Server Error\",\"path\":\"/podPhoto/pageInfoBySections\"}'" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "1822efb2", "metadata": {}, "outputs": [], "source": [ " # \"Accept\": 'application/json, text/plain, */*',\n", "# 'Connection': 'keep-alive',\n", "# 'H-SV-CODE':'video',\n", "# 'HX-CLIENT':'hongxapp',\n", "# 'Host': '192.168.0.111:5173',\n", "# 'Referer': 'http://192.168.0.111:5173/'" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.4" } }, "nbformat": 4, "nbformat_minor": 5 }