diff --git a/app.py b/app.py index fdf71236182feb777457fd775db3ad9b6651fb6c..40797d425b3a0e542a7ee00368394e18a184e64c 100644 --- a/app.py +++ b/app.py @@ -487,6 +487,21 @@ def get_lives(): response.headers['Content-Type'] = 'text/plain; charset=utf-8' return response +@app.route('/liveslib') +def get_liveslib(): + live_path = 'js/custom_spider.jar' + if not os.path.exists(live_path): + with open(live_path,mode='w+',encoding='utf-8') as f: + f.write('') + + with open(live_path,mode='rb') as f: + live_text = f.read() + response = make_response(live_text) + filename = 'custom_spider.jar' + response.headers['Content-Type'] = 'application/octet-stream' + response.headers['Content-Disposition'] = f'attachment;filename="{filename}"' + return response + @app.route('/configs') def config_gen(): # 生成文件 diff --git a/dockerfile b/dockerfile index d9cb5fba63ec13e0a1256ef90408ea8380d77a6b..b3c06a47a3dec88b9c0fe97fd75c7ecf89e41d81 100644 --- a/dockerfile +++ b/dockerfile @@ -32,6 +32,7 @@ ADD app.sh /etc/autostart/ # armv7安装gcc # RUN apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y RUN chmod +x /etc/autostart/app.sh && apt-get clean && apt-get update +RUN apt-get install python3-lxml -y # 执行指令,换源并安装依赖 设置默认pip源 RUN pip install -i https://mirrors.cloud.tencent.com/pypi/simple --upgrade pip \ && pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple \ @@ -56,7 +57,7 @@ EXPOSE 5705 9001 # docker build -f dockerfile -t hjdhnx/drpy_mini . 构建命令,非此文件内命令 # docker push hjdhnx/drpy_mini # docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -f dockerfile -t hjdhnx/drpy:mini_arm64 . -# docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy:armv7 . +# docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy_armv7 . # docker buildx build --platform linux/arm/v7 -f dockerfile -t hjdhnx/drpy:armv7 --push . # 启动命令,非此文件内命令 # docker run -it -p 5705:5705 -p 9001:9001 -v /home/pywork/dr_py:/root/sd/pywork/dr_py --restart=always --name drpy -d hjdhnx/drpy:mini diff --git a/js/custom_spider.jar b/js/custom_spider.jar new file mode 100644 index 0000000000000000000000000000000000000000..152a94b4c151320830ea6f29bc687b3f41ee6088 Binary files /dev/null and b/js/custom_spider.jar differ diff --git a/readme.md b/readme.md index 2ea3a14e77b4d090c9574a21e4e4d9fe9eb8aabd..15672b9a55d350bda9b198eaadaf4d5aaae9610a 100644 --- a/readme.md +++ b/readme.md @@ -43,7 +43,9 @@ [dockerfile教程](https://blog.csdn.net/qq_46158060/article/details/125718218) [获取本地设备信息](https://blog.csdn.net/cui_yonghua/article/details/125508991) [获取本地设备信息](https://m.jb51.net/article/140716.htm) - +###### 2022/09/04 +- [X] 1.内置jar修复了原本tv_box无法播放直播的问题 +- [X] 2.重新构建了三种平台的镜像 amd64,armv7,arm64 ###### 2022/09/04 - [X] 1.增加了dockerfile - [X] 2.基于dockerfile构建的镜像并上传至dockerhub,小白可以一键运行.参考[搭建教程](./安卓本地搭建说明.md) diff --git a/templates/config.txt b/templates/config.txt index 22096941d1495af15da0f25a2aeb86e79688c62f..a423aae2d1944eb57e6396d613b5e89e169cc0b7 100644 --- a/templates/config.txt +++ b/templates/config.txt @@ -2,6 +2,7 @@ {% if config.WALL_PAPER_ENABLE %}"wallpaper":"{{ host }}/pics",{% endif %} "dr_count": {{rules.list|length}}, "mode": {{ mode }}, +"spider": "{{ host }}/liveslib", "homepage":"https://gitcode.net/qq_32394351/dr_py", "sites": [{% for rule in rules.list %}{% if mode == 0 %} {