├── .gitignore ├── .readthedocs.yaml ├── LICENSE ├── docs ├── Makefile ├── conf.py ├── index.md ├── make.bat ├── reference │ ├── client.md │ ├── const.md │ ├── exception.md │ ├── tool │ │ ├── attr.md │ │ ├── download.md │ │ ├── edit.md │ │ ├── export_dir.md │ │ ├── fs_files.md │ │ ├── history.md │ │ ├── iterdir.md │ │ ├── life.md │ │ ├── pool.md │ │ ├── request.md │ │ ├── upload.md │ │ ├── util.md │ │ └── xys.md │ └── type.md └── requirements.txt ├── examples ├── LICENSE ├── LICENSE_zh ├── nano_115_302.js └── nano_115_302.rs ├── modules ├── p115cipher │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115cipher │ │ ├── __init__.py │ │ ├── common.py │ │ ├── const.py │ │ ├── fast.py │ │ ├── normal.py │ │ └── py.typed │ ├── pyproject.toml │ └── readme.md ├── p115dav │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115dav │ │ ├── @cmd │ │ │ ├── download.py │ │ │ └── pull.py │ │ ├── @web_115_filelist │ │ │ └── main.py │ │ ├── @webdav-115-share-link │ │ │ ├── app.py │ │ │ ├── links.yml │ │ │ ├── requirements.txt │ │ │ └── util │ │ │ │ ├── dav_provider.py │ │ │ │ └── watch.py │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── app.py │ │ ├── db.py │ │ ├── py.typed │ │ ├── static │ │ │ └── images │ │ │ │ ├── close.svg │ │ │ │ ├── fancybox.svg │ │ │ │ ├── favicon.svg │ │ │ │ ├── fileball.svg │ │ │ │ ├── iina.svg │ │ │ │ ├── infuse.svg │ │ │ │ ├── mpv.svg │ │ │ │ ├── mxplayer-pro.svg │ │ │ │ ├── mxplayer.svg │ │ │ │ ├── nplayer.svg │ │ │ │ ├── plyr.svg │ │ │ │ ├── potplayer.svg │ │ │ │ ├── stellarplayer.svg │ │ │ │ ├── subtitle.svg │ │ │ │ └── vlc.svg │ │ └── views │ │ │ ├── base.jinja │ │ │ ├── list.jinja │ │ │ └── share_list.jinja │ ├── pyproject.toml │ └── readme.md ├── p115filedb │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115filedb │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── py.typed │ │ └── updatedb.py │ ├── pyproject.toml │ └── readme.md ├── p115nano302 │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115nano302 │ │ ├── __init__.py │ │ ├── __main__.py │ │ └── py.typed │ ├── pyproject.toml │ └── readme.md ├── p115qrcode │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115qrcode │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── cmd │ │ │ ├── __init__.py │ │ │ ├── cmd.py │ │ │ ├── init.py │ │ │ └── web.py │ │ └── py.typed │ ├── pyproject.toml │ └── readme.md ├── p115rsacipher │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115rsacipher │ │ ├── __init__.py │ │ └── py.typed │ ├── pyproject.toml │ └── readme.md ├── p115servedb │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115servedb │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── component │ │ │ ├── __fuse_monkey_patch.py │ │ │ ├── dav.py │ │ │ ├── db.py │ │ │ ├── fuser.py │ │ │ └── log.py │ │ ├── dav.py │ │ ├── fuse.py │ │ ├── init.py │ │ ├── py.typed │ │ ├── static │ │ │ └── images │ │ │ │ ├── close.svg │ │ │ │ ├── fancybox.svg │ │ │ │ ├── favicon.svg │ │ │ │ ├── fileball.svg │ │ │ │ ├── iina.svg │ │ │ │ ├── infuse.svg │ │ │ │ ├── mpv.svg │ │ │ │ ├── mxplayer-pro.svg │ │ │ │ ├── mxplayer.svg │ │ │ │ ├── nplayer.svg │ │ │ │ ├── plyr.svg │ │ │ │ ├── potplayer.svg │ │ │ │ ├── stellarplayer.svg │ │ │ │ ├── subtitle.svg │ │ │ │ └── vlc.svg │ │ └── views │ │ │ ├── base.jinja │ │ │ └── list.jinja │ ├── pyproject.toml │ └── readme.md ├── p115tiny302 │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115tiny302 │ │ ├── __init__.py │ │ ├── __main__.py │ │ └── py.typed │ ├── pyproject.toml │ └── readme.md ├── p115updatedb │ ├── LICENSE │ ├── LICENSE_zh │ ├── p115updatedb │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── py.typed │ │ ├── query.py │ │ └── updatedb.py │ ├── pyproject.toml │ └── readme.md └── p115web │ ├── __main__.py │ ├── app.py │ ├── backend │ ├── __init__.py │ ├── file_lister.py │ └── main.py │ ├── data │ └── 115-cookies.txt │ ├── frontend │ ├── .env │ ├── .npmrc │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── public │ │ ├── icon.png │ │ ├── img │ │ │ ├── archive.svg │ │ │ ├── artplayer.png │ │ │ ├── audio.svg │ │ │ ├── back.svg │ │ │ ├── code.svg │ │ │ ├── config.svg │ │ │ ├── copy.svg │ │ │ ├── db.svg │ │ │ ├── default.svg │ │ │ ├── ebook.svg │ │ │ ├── excel.svg │ │ │ ├── fig.png │ │ │ ├── fileball.svg │ │ │ ├── folder.svg │ │ │ ├── home.svg │ │ │ ├── iina.svg │ │ │ ├── image.svg │ │ │ ├── infuse.svg │ │ │ ├── logo.svg │ │ │ ├── more.svg │ │ │ ├── mpv.png │ │ │ ├── mxplayer.svg │ │ │ ├── nfo.svg │ │ │ ├── nplayer.svg │ │ │ ├── omni.png │ │ │ ├── pdf.svg │ │ │ ├── potplayer.svg │ │ │ ├── ppt.svg │ │ │ ├── text.svg │ │ │ ├── video.svg │ │ │ ├── vlc.svg │ │ │ └── word.svg │ │ ├── manifest.json │ │ └── poppins.otf │ ├── src │ │ ├── api │ │ │ └── index.ts │ │ ├── assets │ │ │ ├── fonts │ │ │ │ └── iconfont │ │ │ │ │ ├── demo.css │ │ │ │ │ ├── demo_index.html │ │ │ │ │ ├── iconfont.css │ │ │ │ │ ├── iconfont.js │ │ │ │ │ ├── iconfont.json │ │ │ │ │ ├── iconfont.svg │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ ├── iconfont.woff │ │ │ │ │ └── iconfont.woff2 │ │ │ └── icon │ │ │ │ ├── attr.svg │ │ │ │ ├── desc.svg │ │ │ │ ├── download.svg │ │ │ │ ├── m3u8.svg │ │ │ │ ├── more.svg │ │ │ │ ├── play.svg │ │ │ │ └── spin.svg │ │ ├── enums │ │ │ └── httpEnum.ts │ │ ├── hooks │ │ │ ├── useIsMobile.ts │ │ │ ├── useMessage.ts │ │ │ └── useRandomId.ts │ │ ├── http │ │ │ ├── Axios.ts │ │ │ ├── axiosCancel.ts │ │ │ ├── axiosRetry.ts │ │ │ ├── axiosTransform.ts │ │ │ ├── checkStatus.ts │ │ │ ├── helper.ts │ │ │ └── index.ts │ │ ├── index.css │ │ ├── layout │ │ │ ├── components │ │ │ │ └── header.tsx │ │ │ └── index.tsx │ │ ├── main.tsx │ │ ├── routes │ │ │ ├── index.tsx │ │ │ └── router.tsx │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── is.ts │ │ ├── views │ │ │ ├── index │ │ │ │ ├── components │ │ │ │ │ ├── FileItem.tsx │ │ │ │ │ └── PlayerList.tsx │ │ │ │ └── index.tsx │ │ │ └── player │ │ │ │ └── index.tsx │ │ └── vite-env.d.ts │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── tsconfig.node.json │ ├── types │ │ ├── axios.d.ts │ │ └── index.d.ts │ ├── vite.config.ts │ └── yarn.lock │ ├── makefile │ ├── static │ ├── assets │ │ ├── index-B74e-FMV.css │ │ └── index-CgGJvJqJ.js │ ├── icon.png │ ├── img │ │ ├── archive.svg │ │ ├── artplayer.png │ │ ├── audio.svg │ │ ├── back.svg │ │ ├── code.svg │ │ ├── config.svg │ │ ├── copy.svg │ │ ├── db.svg │ │ ├── default.svg │ │ ├── ebook.svg │ │ ├── excel.svg │ │ ├── fig.png │ │ ├── fileball.svg │ │ ├── folder.svg │ │ ├── home.svg │ │ ├── iina.svg │ │ ├── image.svg │ │ ├── infuse.svg │ │ ├── logo.svg │ │ ├── more.svg │ │ ├── mpv.png │ │ ├── mxplayer.svg │ │ ├── nfo.svg │ │ ├── nplayer.svg │ │ ├── omni.png │ │ ├── pdf.svg │ │ ├── potplayer.svg │ │ ├── ppt.svg │ │ ├── text.svg │ │ ├── video.svg │ │ ├── vlc.svg │ │ └── word.svg │ ├── index.html │ ├── manifest.json │ └── poppins.otf │ └── todo.md ├── p115client ├── __init__.py ├── _upload.py ├── client.py ├── const.py ├── exception.py ├── py.typed ├── tool │ ├── __init__.py │ ├── attr.py │ ├── download.py │ ├── edit.py │ ├── export_dir.py │ ├── fs_files.py │ ├── history.py │ ├── iterdir.py │ ├── life.py │ ├── pool.py │ ├── request.py │ ├── upload.py │ ├── util.py │ └── xys.py └── type.py ├── pyproject.toml └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Python: 2 | *.py[codz] 3 | *.so 4 | *.egg 5 | *.egg-info 6 | dist 7 | build 8 | _build 9 | 10 | # Compiled C++ files 11 | *.out 12 | 13 | # Temp File 14 | *.sw[aop] 15 | 16 | # github merge file 17 | *.orig 18 | 19 | #vscode 20 | .vscode 21 | 22 | # Folder view configuration files 23 | .DS_Store 24 | 25 | # Thumbnail cache files 26 | ._* 27 | Thumbs.db 28 | 29 | # Files that might appear on external disks 30 | .Spotlight-V100 31 | .Trashes 32 | 33 | # cache path 34 | .idea/ 35 | __pycache__/ 36 | 37 | # Log file 38 | *.log 39 | 40 | # Zipped file 41 | *.zip 42 | *.7z 43 | *.rar 44 | 45 | # config file 46 | config.json 47 | 48 | # nodejs modules 49 | node_modules/ 50 | 51 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Read the Docs configuration file 2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 3 | 4 | # Required 5 | version: 2 6 | 7 | # Set the version of Python and other tools you might need 8 | build: 9 | os: ubuntu-24.04 10 | tools: 11 | python: "3.12" 12 | 13 | # Build documentation in the docs/ directory with Sphinx 14 | sphinx: 15 | configuration: docs/conf.py 16 | 17 | # We recommend specifying your dependencies to enable reproducible builds: 18 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 19 | python: 20 | install: 21 | - method: pip 22 | path: . 23 | - requirements: docs/requirements.txt 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 ChenyangGao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | 13 | import sys 14 | from pathlib import Path 15 | 16 | sys.path.insert(0, str(Path(__file__).parent.parent)) 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'p115client' 21 | copyright = '2024, ChenyangGao ' 22 | author = 'ChenyangGao' 23 | release = '0.0.1' 24 | 25 | # -- General configuration --------------------------------------------------- 26 | 27 | # Add any Sphinx extension module names here, as strings. They can be 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 29 | # ones. 30 | extensions = [ 31 | "myst_parser", 32 | "sphinx.ext.intersphinx", 33 | "sphinx.ext.autodoc", 34 | "sphinx.ext.napoleon", 35 | "sphinx.ext.todo", 36 | "sphinx.ext.viewcode", 37 | "sphinx.ext.autosectionlabel", 38 | # external 39 | "sphinx_copybutton", 40 | ] 41 | 42 | # Add any paths that contain templates here, relative to this directory. 43 | templates_path = ['_templates'] 44 | 45 | # The language for content autogenerated by Sphinx. Refer to documentation 46 | # for a list of supported languages. 47 | # 48 | # This is also used if you do content translation via gettext catalogs. 49 | # Usually you set "language" from the command line for these cases. 50 | language = 'zh-CN' 51 | 52 | # List of patterns, relative to source directory, that match files and 53 | # directories to ignore when looking for source files. 54 | # This pattern also affects html_static_path and html_extra_path. 55 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 56 | 57 | todo_include_todos = True 58 | 59 | # -- Options for HTML output ------------------------------------------------- 60 | 61 | # The theme to use for HTML and HTML Help pages. See the documentation for 62 | # a list of builtin themes. 63 | # 64 | html_theme = 'furo' 65 | html_title = "p115client" 66 | 67 | # Add any paths that contain custom static files (such as style sheets) here, 68 | # relative to this directory. They are copied after the builtin static files, 69 | # so a file named "default.css" will overwrite the builtin "default.css". 70 | html_static_path = ['_static'] 71 | 72 | intersphinx_mapping = { 73 | "python": ("https://docs.python.org/", None), 74 | } 75 | 76 | copybutton_prompt_text = ( 77 | r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " 78 | ) 79 | copybutton_prompt_is_regexp = True 80 | autoclass_content = "both" 81 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide-toc: true 3 | --- 4 | 5 | ```{include} ../readme.md 6 | :relative-docs: docs/ 7 | :relative-images: 8 | ``` 9 | 10 | ```{toctree} 11 | :caption: Reference 12 | :hidden: 13 | 14 | reference/client 15 | reference/const 16 | reference/exception 17 | reference/type 18 | ``` 19 | 20 | ```{toctree} 21 | :caption: Tool 22 | :hidden: 23 | 24 | reference/tool/attr 25 | reference/tool/download 26 | reference/tool/edit 27 | reference/tool/export_dir 28 | reference/tool/fs_files 29 | reference/tool/history 30 | reference/tool/iterdir 31 | reference/tool/life 32 | reference/tool/pool 33 | reference/tool/request 34 | reference/tool/upload 35 | reference/tool/util 36 | reference/tool/xys 37 | ``` 38 | 39 | ```{toctree} 40 | :caption: Development 41 | :hidden: 42 | 43 | License: MIT 44 | Bug Reports 45 | Source Code 46 | ``` 47 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/reference/client.md: -------------------------------------------------------------------------------- 1 | # client 2 | 3 | 此模块包含了客户端操作的基本封装 4 | 5 | ```{eval-rst} 6 | .. automodule:: p115client.client 7 | :show-inheritance: 8 | :members: 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/reference/const.md: -------------------------------------------------------------------------------- 1 | # const 2 | 3 | 此模块包含了一些重要的常量 4 | 5 | ```{eval-rst} 6 | .. automodule:: p115client.const 7 | :members: 8 | ``` 9 | -------------------------------------------------------------------------------- /docs/reference/exception.md: -------------------------------------------------------------------------------- 1 | # exception 2 | 3 | 此模块包含了所有的异常类 4 | 5 | ```{eval-rst} 6 | .. automodule:: p115client.exception 7 | :show-inheritance: 8 | :members: 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/reference/tool/attr.md: -------------------------------------------------------------------------------- 1 | # attr 2 | 3 | 属性 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.attr 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/download.md: -------------------------------------------------------------------------------- 1 | # download 2 | 3 | 下载 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.download 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/edit.md: -------------------------------------------------------------------------------- 1 | # edit 2 | 3 | 编辑信息 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.edit 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/export_dir.md: -------------------------------------------------------------------------------- 1 | # export_dir 2 | 3 | 导出目录树 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.export_dir 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/fs_files.md: -------------------------------------------------------------------------------- 1 | # fs_files 2 | 3 | 罗列文件列表 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.fs_files 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/history.md: -------------------------------------------------------------------------------- 1 | # history 2 | 3 | 115 历史记录 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.history 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/iterdir.md: -------------------------------------------------------------------------------- 1 | # iterdir 2 | 3 | 迭代目录 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.iterdir 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/life.md: -------------------------------------------------------------------------------- 1 | # life 2 | 3 | 115 生活事件 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.life 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/pool.md: -------------------------------------------------------------------------------- 1 | # pool 2 | 3 | cookies 池 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.pool 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/request.md: -------------------------------------------------------------------------------- 1 | # request 2 | 3 | 自定义请求函数 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.request 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/upload.md: -------------------------------------------------------------------------------- 1 | # upload 2 | 3 | 上传 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.upload 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/util.md: -------------------------------------------------------------------------------- 1 | # util 2 | 3 | 其它工具函数 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.util 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/tool/xys.md: -------------------------------------------------------------------------------- 1 | # xys 2 | 3 | 许愿树 4 | --- 5 | 6 | ```{eval-rst} 7 | .. automodule:: p115client.tool.xys 8 | :show-inheritance: 9 | :members: 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/reference/type.md: -------------------------------------------------------------------------------- 1 | # type 2 | 3 | 此模块包含了一些数据类型 4 | 5 | ```{eval-rst} 6 | .. automodule:: p115client.type 7 | :show-inheritance: 8 | :members: 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | furo 2 | myst_parser 3 | sphinx_copybutton 4 | -------------------------------------------------------------------------------- /examples/nano_115_302.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/examples/nano_115_302.rs -------------------------------------------------------------------------------- /modules/p115cipher/p115cipher/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 3) 6 | __license__ = "GPLv3 " 7 | 8 | from .fast import * 9 | from .normal import * 10 | -------------------------------------------------------------------------------- /modules/p115cipher/p115cipher/const.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | 6 | from typing import Final 7 | 8 | AES_KEY: Final = b"\xfb\x1a\x19\xd6R\xf5\xaa\xf7\xbce\x1d\x0fi\xbfB/" 9 | AES_IV: Final = b"i\xbfB/I\x96\x05P\xa0\xadD\xec4F\xcbL" 10 | CRC_SALT: Final = b"^j>WD3Kr?J2gLFjD4W2y@" 11 | MD5_SALT: Final = b"Qclm8MGWUv59TnrR0XPg" 12 | ECDH_REMOTE_PUBKEY: Final = bytes(( 13 | 0x57, 0xA2, 0x92, 0x57, 0xCD, 0x23, 0x20, 0xE5, 0xD6, 0xD1, 0x43, 0x32, 0x2F, 0xA4, 0xBB, 0x8A, 14 | 0x3C, 0xF9, 0xD3, 0xCC, 0x62, 0x3E, 0xF5, 0xED, 0xAC, 0x62, 0xB7, 0x67, 0x8A, 0x89, 0xC9, 0x1A, 15 | 0x83, 0xBA, 0x80, 0x0D, 0x61, 0x29, 0xF5, 0x22, 0xD0, 0x34, 0xC8, 0x95, 0xDD, 0x24, 0x65, 0x24, 16 | 0x3A, 0xDD, 0xC2, 0x50, 0x95, 0x3B, 0xEE, 0xBA, 17 | )) 18 | G_key_l: Final = bytes(( 19 | 0x78, 0x06, 0xad, 0x4c, 0x33, 0x86, 0x5d, 0x18, 0x4c, 0x01, 0x3f, 0x46, 20 | )) 21 | G_key_s: Final = bytes((0x29, 0x23, 0x21, 0x5e)) 22 | G_kts: Final = bytes(( 23 | 0xf0, 0xe5, 0x69, 0xae, 0xbf, 0xdc, 0xbf, 0x8a, 0x1a, 0x45, 0xe8, 0xbe, 0x7d, 0xa6, 0x73, 0xb8, 24 | 0xde, 0x8f, 0xe7, 0xc4, 0x45, 0xda, 0x86, 0xc4, 0x9b, 0x64, 0x8b, 0x14, 0x6a, 0xb4, 0xf1, 0xaa, 25 | 0x38, 0x01, 0x35, 0x9e, 0x26, 0x69, 0x2c, 0x86, 0x00, 0x6b, 0x4f, 0xa5, 0x36, 0x34, 0x62, 0xa6, 26 | 0x2a, 0x96, 0x68, 0x18, 0xf2, 0x4a, 0xfd, 0xbd, 0x6b, 0x97, 0x8f, 0x4d, 0x8f, 0x89, 0x13, 0xb7, 27 | 0x6c, 0x8e, 0x93, 0xed, 0x0e, 0x0d, 0x48, 0x3e, 0xd7, 0x2f, 0x88, 0xd8, 0xfe, 0xfe, 0x7e, 0x86, 28 | 0x50, 0x95, 0x4f, 0xd1, 0xeb, 0x83, 0x26, 0x34, 0xdb, 0x66, 0x7b, 0x9c, 0x7e, 0x9d, 0x7a, 0x81, 29 | 0x32, 0xea, 0xb6, 0x33, 0xde, 0x3a, 0xa9, 0x59, 0x34, 0x66, 0x3b, 0xaa, 0xba, 0x81, 0x60, 0x48, 30 | 0xb9, 0xd5, 0x81, 0x9c, 0xf8, 0x6c, 0x84, 0x77, 0xff, 0x54, 0x78, 0x26, 0x5f, 0xbe, 0xe8, 0x1e, 31 | 0x36, 0x9f, 0x34, 0x80, 0x5c, 0x45, 0x2c, 0x9b, 0x76, 0xd5, 0x1b, 0x8f, 0xcc, 0xc3, 0xb8, 0xf5, 32 | )) 33 | RSA_PRIKEY_PAIR: Final = ( 34 | 0x8C81424BC166F4918756E9F7B22EFAA03479B081E61896872CB7C51C910D7EC1A4CE2871424D5C9149BD5E08A25959A19AD3C981E6512EFDAB2BB8DA3F1E315C294BD117A9FB9D8CE8E633B4962E087C629DC6CA3A149214B4091EF2B0363CB3AE6C7EE702377F055ED3CD93F6C342256A76554BBEA7F203437BBE65F2DA2741, 35 | 0x10001, 36 | 0x3704DAB00D80C25E464FFB785A16D95F688D0A5823811758C16308D5A1DB55FA800D967A9B4AEDE79AA783ADFFDCDB23541C80B8D436901F172B1CCCA190B224DBE777BF18B96DD9A30AACE8780350793A4F90A645A7747EF695622EADBE23A4C6D88F22E87842B43B35486C2D1B5B1FA77DB3528B0910CA84EDB7A46AFDBED1, 37 | ) 38 | RSA_PUBKEY_PAIR: Final = ( 39 | 0x8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683, 40 | 0x10001, 41 | ) 42 | -------------------------------------------------------------------------------- /modules/p115cipher/p115cipher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115cipher/p115cipher/py.typed -------------------------------------------------------------------------------- /modules/p115cipher/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115cipher" 3 | version = "0.0.3" 4 | description = "115 cipher module." 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115cipher" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115cipher" 10 | keywords = ["115", "webdisk", "cipher"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.10", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.10" 30 | ecdsa = "*" 31 | lz4 = "*" 32 | pycryptodome = "*" 33 | python-iterutils = ">=0.0.7" 34 | 35 | [build-system] 36 | requires = ["poetry-core"] 37 | build-backend = "poetry.core.masonry.api" 38 | 39 | [[tool.poetry.packages]] 40 | include = "p115cipher" 41 | -------------------------------------------------------------------------------- /modules/p115cipher/readme.md: -------------------------------------------------------------------------------- 1 | # 115 cipher module 2 | 3 | ## Installation 4 | 5 | You can install via [pypi](https://pypi.org/project/p115cipher/) 6 | 7 | ```console 8 | pip install -U p115cipher 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```python 14 | from p115cipher.fast import * 15 | from p115cipher.normal import * 16 | ``` 17 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/@webdav-115-share-link/links.yml: -------------------------------------------------------------------------------- 1 | # 请在下面罗列挂载链接 2 | 盗火纪录片: https://115.com/s/sw68md23w8m?password=q353# 3 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/@webdav-115-share-link/requirements.txt: -------------------------------------------------------------------------------- 1 | cheroot 2 | python-115 3 | PyYAML 4 | watchdog 5 | WsgiDAV -------------------------------------------------------------------------------- /modules/p115dav/p115dav/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 10) 6 | __license__ = "GPLv3 " 7 | 8 | from .app import make_application 9 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115dav/p115dav/py.typed -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/fancybox.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/fileball.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/iina.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/infuse.svg: -------------------------------------------------------------------------------- 1 | Layer 1 -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/mpv.svg: -------------------------------------------------------------------------------- 1 | image/svg+xmlLogo of mpv -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/mxplayer-pro.svg: -------------------------------------------------------------------------------- 1 | PRO -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/mxplayer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/nplayer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/plyr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/subtitle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/p115dav/static/images/vlc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115dav/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115dav" 3 | version = "0.0.10.0.1" 4 | description = "115 网盘 WebDAV 和 302 直链程序." 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115dav" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115dav" 10 | keywords = ["python-115", "webdav"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | a2wsgi = ">=1.10.7" 31 | blacksheep = ">=2.0.8" 32 | cachedict = ">=0.0.3" 33 | httpagentparser = "*" 34 | orjson = "*" 35 | p115client = ">=0.0.5.10.6" 36 | path_predicate = ">=0.0.1.1" 37 | posixpatht = ">=0.0.3" 38 | pysubs2 = "*" 39 | python-dictattr = ">=0.0.4" 40 | python-encode_uri = ">=0.0.3" 41 | python-property = ">=0.0.3" 42 | python-sqlitedict = ">=0.0.1.2" 43 | python-texttools = ">=0.0.3" 44 | pyyaml = "*" 45 | rich = "*" 46 | uvicorn = "*" 47 | wsgidav = "*" 48 | 49 | [tool.poetry.scripts] 50 | p115dav = "p115dav.__main__:main" 51 | 52 | [build-system] 53 | requires = ["poetry-core"] 54 | build-backend = "poetry.core.masonry.api" 55 | 56 | [[tool.poetry.packages]] 57 | include = "p115dav" 58 | -------------------------------------------------------------------------------- /modules/p115filedb/p115filedb/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 3) 6 | __license__ = "GPLv3 " 7 | 8 | from .updatedb import * 9 | -------------------------------------------------------------------------------- /modules/p115filedb/p115filedb/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __doc__ = "遍历 115 网盘的目录,仅导出文件信息导出到数据库" 6 | 7 | from argparse import ArgumentParser, Namespace, RawTextHelpFormatter 8 | from pathlib import Path 9 | 10 | parser = ArgumentParser( 11 | formatter_class=RawTextHelpFormatter, 12 | description=__doc__, 13 | ) 14 | parser.add_argument("top_dirs", metavar="dir", nargs="*", help="""\ 15 | 115 目录,可以传入多个,如果不传默认为 0 16 | 允许 3 种类型的目录 17 | 1. 整数,视为目录的 id 18 | 2. 形如 "/名字/名字/..." 的路径,最前面的 "/" 可以省略,本程序会尝试获取对应的 id 19 | 3. 形如 "根目录 > 名字 > 名字 > ..." 的路径,来自点击文件的【显示属性】,在【位置】这部分看到的路径,本程序会尝试获取对应的 id 20 | """) 21 | parser.add_argument("-cp", "--cookies-path", default="", help="cookies 文件保存路径,默认为当前工作目录下的 115-cookies.txt") 22 | parser.add_argument("-f", "--dbfile", default="", help="sqlite 数据库文件路径,默认为在当前工作目录下的 f'115-file-{user_id}.db'") 23 | parser.add_argument("-i", "--interval", type=float, default=0, help="两个任务之间的睡眠时间,如果 <= 0,则不睡眠") 24 | parser.add_argument("-m", "--max-workers", type=int, help="拉取分页时的最大并发数,默认会自动确定") 25 | parser.add_argument("-p", "--page-size", type=int, default=7_000, help="每次批量拉取的分页大小,默认值:7,000") 26 | parser.add_argument("-cl", "--check-for-relogin", action="store_true", help="当风控时,自动重新扫码登录") 27 | parser.add_argument("-v", "--version", action="store_true", help="输出版本号") 28 | parser.add_argument("-l", "--license", action="store_true", help="输出开源协议") 29 | 30 | 31 | def parse_args(argv: None | list[str] = None, /) -> Namespace: 32 | args = parser.parse_args(argv) 33 | if args.version: 34 | from p115filedb import __version__ 35 | print(".".join(map(str, __version__))) 36 | raise SystemExit(0) 37 | elif args.license: 38 | from p115filedb import __license__ 39 | print(__license__) 40 | raise SystemExit(0) 41 | return args 42 | 43 | 44 | def main(argv: None | list[str] | Namespace = None, /): 45 | if isinstance(argv, Namespace): 46 | args = argv 47 | else: 48 | args = parse_args(argv) 49 | 50 | from p115client import P115Client 51 | from p115filedb import updatedb 52 | 53 | if cookies_path := args.cookies_path: 54 | cookies = Path(cookies_path) 55 | else: 56 | cookies = Path("115-cookies.txt") 57 | client = P115Client(cookies, check_for_relogin=args.check_for_relogin, ensure_cookies=True, app="alipaymini") 58 | updatedb( 59 | client, 60 | dbfile=args.dbfile, 61 | top_dirs=args.top_dirs or 0, 62 | page_size=args.page_size, 63 | interval=args.interval, 64 | max_workers=args.max_workers, 65 | ) 66 | 67 | 68 | if __name__ == "__main__": 69 | from sys import path 70 | 71 | path[0] = str(Path(__file__).parents[1]) 72 | main() 73 | 74 | -------------------------------------------------------------------------------- /modules/p115filedb/p115filedb/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115filedb/p115filedb/py.typed -------------------------------------------------------------------------------- /modules/p115filedb/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115filedb" 3 | version = "0.0.3" 4 | description = "把 115 网盘的文件列表导出到数据库(仅文件)" 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115filedb" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115filedb" 10 | keywords = ["python-115", "updatedb"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | orjson = "*" 31 | p115client = ">=0.0.5.5.4.1" 32 | python-concurrenttools = ">=0.0.8.2" 33 | sqlitetools = ">=0.0.2.1" 34 | 35 | [tool.poetry.scripts] 36 | p115filedb = "p115filedb.__main__:main" 37 | 38 | [build-system] 39 | requires = ["poetry-core"] 40 | build-backend = "poetry.core.masonry.api" 41 | 42 | [[tool.poetry.packages]] 43 | include = "p115filedb" 44 | -------------------------------------------------------------------------------- /modules/p115filedb/readme.md: -------------------------------------------------------------------------------- 1 | # 把 115 网盘的文件列表导出到数据库(仅文件) 2 | 3 | ## 安装 4 | 5 | 你可以通过 [pypi](https://pypi.org/project/p115filedb/) 安装 6 | 7 | ```console 8 | pip install -U p115filedb 9 | ``` 10 | 11 | ## 用法 12 | 13 | ### 模块 14 | 15 | ```python 16 | from p115filedb import updatedb 17 | ``` 18 | 19 | ### 命令行 20 | 21 | ```console 22 | $ p115filedb -h 23 | usage: p115filedb [-h] [-cp COOKIES_PATH] [-f DBFILE] [-i INTERVAL] [-m MAX_WORKERS] [-p PAGE_SIZE] [-cl] [-v] [-l] [dir ...] 24 | 25 | 遍历 115 网盘的目录,仅导出文件信息导出到数据库 26 | 27 | positional arguments: 28 | dir 115 目录,可以传入多个,如果不传默认为 0 29 | 允许 3 种类型的目录 30 | 1. 整数,视为目录的 id 31 | 2. 形如 "/名字/名字/..." 的路径,最前面的 "/" 可以省略,本程序会尝试获取对应的 id 32 | 3. 形如 "根目录 > 名字 > 名字 > ..." 的路径,来自点击文件的【显示属性】,在【位置】这部分看到的路径,本程序会尝试获取对应的 id 33 | 34 | options: 35 | -h, --help show this help message and exit 36 | -cp COOKIES_PATH, --cookies-path COOKIES_PATH 37 | cookies 文件保存路径,默认为当前工作目录下的 115-cookies.txt 38 | -f DBFILE, --dbfile DBFILE 39 | sqlite 数据库文件路径,默认为在当前工作目录下的 f'115-file-{user_id}.db' 40 | -i INTERVAL, --interval INTERVAL 41 | 两个任务之间的睡眠时间,如果 <= 0,则不睡眠 42 | -m MAX_WORKERS, --max-workers MAX_WORKERS 43 | 拉取分页时的最大并发数,默认会自动确定 44 | -p PAGE_SIZE, --page-size PAGE_SIZE 45 | 每次批量拉取的分页大小,默认值:8,000 46 | -cl, --check-for-relogin 47 | 当风控时,自动重新扫码登录 48 | -v, --version 输出版本号 49 | -l, --license 输出开源协议 50 | ``` 51 | -------------------------------------------------------------------------------- /modules/p115nano302/p115nano302/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115nano302/p115nano302/py.typed -------------------------------------------------------------------------------- /modules/p115nano302/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115nano302" 3 | version = "0.1.1.2" 4 | description = "115 nano 302 backend." 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115nano302" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115nano302" 10 | keywords = ["python-115", "302", "backend"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | blacksheep = "*" 31 | cachedict = ">=0.0.3" 32 | orjson = "*" 33 | p115rsacipher = ">=0.0.1" 34 | pyyaml = "*" 35 | rich = "*" 36 | uvicorn = "*" 37 | 38 | [tool.poetry.scripts] 39 | p115nano302 = "p115nano302.__main__:main" 40 | nano302 = "p115nano302.__main__:main" 41 | 42 | [build-system] 43 | requires = ["poetry-core"] 44 | build-backend = "poetry.core.masonry.api" 45 | 46 | [[tool.poetry.packages]] 47 | include = "p115nano302" 48 | -------------------------------------------------------------------------------- /modules/p115qrcode/p115qrcode/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | 6 | def main(): 7 | from p115qrcode.cmd import parser 8 | 9 | args = parser.parse_args() 10 | if args.version: 11 | from p115qrcode import __version__ 12 | print(".".join(map(str, __version__))) 13 | raise SystemExit(0) 14 | elif args.license: 15 | from p115qrcode import __license__ 16 | print(__license__) 17 | raise SystemExit(0) 18 | if args.func: 19 | args.func(args) 20 | else: 21 | parser.parse_args(["-h"]) 22 | 23 | if __name__ == "__main__": 24 | from pathlib import Path 25 | from sys import path 26 | 27 | path[0] = str(Path(__file__).parents[1]) 28 | main() 29 | -------------------------------------------------------------------------------- /modules/p115qrcode/p115qrcode/cmd/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __all__ = ["parser"] 6 | 7 | from .init import parser 8 | from . import cmd, web 9 | -------------------------------------------------------------------------------- /modules/p115qrcode/p115qrcode/cmd/init.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __all__ = ["parser", "subparsers"] 5 | 6 | from argparse import ArgumentParser, RawTextHelpFormatter 7 | 8 | parser = ArgumentParser( 9 | description="115 网盘扫码登录", 10 | formatter_class=RawTextHelpFormatter, 11 | ) 12 | parser.add_argument("-l", "--license", action="store_true", help="输出授权信息") 13 | parser.add_argument("-v", "--version", action="store_true", help="输出版本号") 14 | parser.set_defaults(func=None) 15 | subparsers = parser.add_subparsers() 16 | 17 | -------------------------------------------------------------------------------- /modules/p115qrcode/p115qrcode/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115qrcode/p115qrcode/py.typed -------------------------------------------------------------------------------- /modules/p115qrcode/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115qrcode" 3 | version = "0.0.4" 4 | description = "115 网盘二维码扫码登录" 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115qrcode" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115qrcode" 10 | keywords = ["python-115", "115", "qrcode"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | flask = "*" 31 | orjson = "*" 32 | httpx = "*" 33 | httpx_request = ">=0.1" 34 | python-iterutils = ">=0.1.8" 35 | python-startfile = ">=0.0.2" 36 | qrcode = "*" 37 | 38 | [tool.poetry.scripts] 39 | p115qrcode = "p115qrcode.__main__:main" 40 | 41 | [build-system] 42 | requires = ["poetry-core"] 43 | build-backend = "poetry.core.masonry.api" 44 | 45 | [[tool.poetry.packages]] 46 | include = "p115qrcode" 47 | -------------------------------------------------------------------------------- /modules/p115qrcode/readme.md: -------------------------------------------------------------------------------- 1 | # 115 网盘二维码扫码登录. 2 | 3 | ## 安装 4 | 5 | 你可以通过 [pypi](https://pypi.org/project/p115qrcode/) 安装 6 | 7 | ```console 8 | pip install -U p115qrcode 9 | ``` 10 | 11 | ## 使用 12 | 13 | ### 作为模块 14 | 15 | 详情请查看具体函数的文档 16 | 17 | ```python 18 | import p115qrcode 19 | ``` 20 | 21 | ### 作为命令行 22 | 23 | ```console 24 | $ p115qrcode -h 25 | usage: p115qrcode [-h] [-l] [-v] {cmd,web} ... 26 | 27 | 115 网盘扫码登录 28 | 29 | positional arguments: 30 | {cmd,web} 31 | 32 | options: 33 | -h, --help show this help message and exit 34 | -l, --license 输出授权信息 35 | -v, --version 输出版本号 36 | 37 | $ p115qrcode cmd -h 38 | usage: p115qrcode cmd [-h] [-o OUTPUT_FILE] [-oq] [-c COOKIES] [-cp COOKIES_PATH] [-l] [-v] 39 | [{web,ios,115ios,android,115android,115ipad,tv,qandroid,wechatmini,alipaymini,harmony}] 40 | 41 | 115 网盘扫码登录(命令行版) 42 | 43 | positional arguments: 44 | {web,ios,115ios,android,115android,115ipad,tv,qandroid,wechatmini,alipaymini,harmony} 45 | 选择一个 app 进行登录,默认值 'alipaymini' 46 | 47 | options: 48 | -h, --help show this help message and exit 49 | -o OUTPUT_FILE, --output-file OUTPUT_FILE 50 | 保存到文件,未指定时输出到 stdout 51 | -oq, --open-qrcode 在浏览器中打开二维码,而不是在命令行输出 52 | -c COOKIES, --cookies COOKIES 53 | 115 登录 cookies 或二维码的 uid,使用后可以自动扫码,优先级高于 -cp/--cookies-path 54 | -cp COOKIES_PATH, --cookies-path COOKIES_PATH 55 | cookies 文件保存路径,使用后可以自动扫码 56 | -l, --license 输出授权信息 57 | -v, --version 输出版本号 58 | 59 | $ p115qrcode web -h 60 | usage: p115qrcode web [-h] [-H HOST] [-P PORT] [-c] [-d] [-l] [-v] 61 | 62 | 115 网盘扫码登录(网页版) 63 | 64 | options: 65 | -h, --help show this help message and exit 66 | -H HOST, --host HOST ip 或 hostname,默认值:'localhost' 67 | -P PORT, --port PORT 端口号,默认值:8000 68 | -c, --cors 标识浏览器已经使用 CORS 插件,因此不需要后台代理接口的调用 69 | -d, --debug 启用 debug 模式 70 | -l, --license 输出授权信息 71 | -v, --version 输出版本号 72 | ``` 73 | -------------------------------------------------------------------------------- /modules/p115rsacipher/p115rsacipher/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115rsacipher/p115rsacipher/py.typed -------------------------------------------------------------------------------- /modules/p115rsacipher/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115rsacipher" 3 | version = "0.0.1" 4 | description = "115 webdisk RSA encryption and decryption." 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115rsacipher" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115rsacipher" 10 | keywords = ["python-115", "RSA", "cipher"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | 31 | [build-system] 32 | requires = ["poetry-core"] 33 | build-backend = "poetry.core.masonry.api" 34 | 35 | [[tool.poetry.packages]] 36 | include = "p115rsacipher" 37 | -------------------------------------------------------------------------------- /modules/p115rsacipher/readme.md: -------------------------------------------------------------------------------- 1 | # 115 webdisk RSA encryption and decryption. 2 | 3 | ## Installation 4 | 5 | You can install via [pypi](https://pypi.org/project/p115rsacipher/) 6 | 7 | ```console 8 | pip install -U p115rsacipher 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```python 14 | from p115rsacipher import encrypt, decrypt 15 | ``` 16 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 5) 6 | __license__ = "GPLv3 " 7 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | def main(): 5 | from p115servedb.init import parser 6 | 7 | args = parser.parse_args() 8 | if args.version: 9 | from p115servedb import __version__ 10 | print(".".join(map(str, __version__))) 11 | raise SystemExit(0) 12 | if args.func: 13 | args.func(args) 14 | else: 15 | parser.parse_args(["-h"]) 16 | 17 | if __name__ == "__main__": 18 | from pathlib import Path 19 | from sys import path 20 | 21 | path[0] = str(Path(__file__).parents[1]) 22 | main() 23 | 24 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/component/__fuse_monkey_patch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | import errno 5 | from fuse import fuse_exit, log, FUSE # type: ignore 6 | 7 | def _wrapper(func, *args, **kwargs): 8 | 'Decorator for the methods that follow' 9 | func_name = getattr(func, "__name__", "") 10 | try: 11 | if func_name == "init": 12 | # init may not fail, as its return code is just stored as 13 | # private_data field of struct fuse_context 14 | return func(*args, **kwargs) or 0 15 | else: 16 | try: 17 | return func(*args, **kwargs) or 0 18 | except OSError as e: 19 | if e.errno is None: 20 | log.error("Uncaught OSError from FUSE operation %s, " 21 | "returning errno.EIO.", 22 | func_name, exc_info=True) 23 | print(f"{type(e).__qualname__}: {e}") 24 | return -errno.EIO 25 | if e.errno > 0: 26 | log.debug( 27 | "FUSE operation %s raised a %s, returning errno %s.", 28 | func_name, type(e), e.errno, exc_info=True) 29 | return -e.errno 30 | else: 31 | log.error( 32 | "FUSE operation %s raised an OSError with negative " 33 | "errno %s, returning errno.EINVAL.", 34 | func_name, e.errno, exc_info=True) 35 | return -errno.EINVAL 36 | except Exception: 37 | log.error("Uncaught exception from FUSE operation %s, " 38 | "returning errno.EINVAL.", 39 | func_name, exc_info=True) 40 | return -errno.EINVAL 41 | except BaseException as e: 42 | #self.__critical_exception = e 43 | log.critical( 44 | "Uncaught critical exception from FUSE operation %s, aborting.", 45 | func_name, exc_info=True) 46 | # the raised exception (even SystemExit) will be caught by FUSE 47 | # potentially causing SIGSEGV, so tell system to stop/interrupt FUSE 48 | fuse_exit() 49 | return -errno.EFAULT 50 | 51 | FUSE._wrapper = staticmethod(_wrapper) 52 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/component/log.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __all__ = ["logger", "ColoredLevelNameFormatter"] 6 | 7 | import logging 8 | 9 | 10 | logger = logging.getLogger("alist_fuse") 11 | 12 | 13 | class ColoredLevelNameFormatter(logging.Formatter): 14 | 15 | def format(self, record): 16 | match record.levelno: 17 | case logging.DEBUG: 18 | # blue 19 | record.levelname = f"\x1b[1;34m{record.levelname}\x1b[0m" 20 | case logging.INFO: 21 | # green 22 | record.levelname = f"\x1b[1;32m{record.levelname}\x1b[0m" 23 | case logging.WARNING: 24 | # yellow 25 | record.levelname = f"\x1b[1;33m{record.levelname}\x1b[0m" 26 | case logging.ERROR: 27 | # red 28 | record.levelname = f"\x1b[1;31m{record.levelname}\x1b[0m" 29 | case logging.CRITICAL: 30 | # magenta 31 | record.levelname = f"\x1b[1;35m{record.levelname}\x1b[0m" 32 | case _: 33 | # dark grey 34 | record.levelname = f"\x1b[1;2m{record.levelname}\x1b[0m" 35 | return super().format(record) 36 | 37 | 38 | handler = logging.StreamHandler() 39 | formatter = ColoredLevelNameFormatter( 40 | "[\x1b[1m%(asctime)s\x1b[0m] (%(levelname)s) \x1b[1;36m%(instance)s.\x1b[0m\x1b[1;3;32m%(funcName)s\x1b[0m" 41 | " @ \x1b[1;34m%(name)s\x1b[0m \x1b[5;31m➜\x1b[0m %(message)s" 42 | ) 43 | handler.setFormatter(formatter) 44 | logger.addHandler(handler) 45 | 46 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/init.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __all__ = ["parser", "subparsers"] 5 | 6 | from argparse import ArgumentParser, RawTextHelpFormatter 7 | 8 | parser = ArgumentParser( 9 | description="servedb 命令行工具集", 10 | formatter_class=RawTextHelpFormatter, 11 | ) 12 | parser.add_argument("-v", "--version", action="store_true", help="输出版本号") 13 | parser.set_defaults(func=None) 14 | subparsers = parser.add_subparsers() 15 | 16 | from . import dav, fuse 17 | 18 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115servedb/p115servedb/py.typed -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/fancybox.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/fileball.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/iina.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/infuse.svg: -------------------------------------------------------------------------------- 1 | Layer 1 -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/mpv.svg: -------------------------------------------------------------------------------- 1 | image/svg+xmlLogo of mpv -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/mxplayer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/nplayer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/plyr.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/subtitle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/p115servedb/static/images/vlc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/p115servedb/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115servedb" 3 | version = "0.0.5.5.3" 4 | description = "115 网盘基于 p115updatedb 导出数据库的挂载服务" 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115servedb" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115servedb" 10 | keywords = ["python-115", "servedb"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | a2wsgi = ">=1.10.7" 31 | blacksheep = "*" 32 | cachedict = ">=0.0.3" 33 | fusepy = "*" 34 | httpagentparser = "*" 35 | orjson = "*" 36 | p115client = ">=0.0.4.8.4" 37 | p115updatedb = ">=0.0.10.8" 38 | path_predicate = ">=0.0.1.1" 39 | posixpatht = ">=0.0.3" 40 | pysubs2 = "*" 41 | python-encode_uri = ">=0.0.3" 42 | python-httpfile = ">=0.0.5" 43 | python-property = ">=0.0.3" 44 | pyyaml = "*" 45 | urllib3 = "*" 46 | uvicorn = "*" 47 | wsgidav = "*" 48 | 49 | [tool.poetry.scripts] 50 | p115servedb = "p115servedb.__main__:main" 51 | servedb = "p115servedb.__main__:main" 52 | servedb-dav = "p115servedb.dav:main" 53 | servedb-fuse = "p115servedb.fuse:main" 54 | 55 | [build-system] 56 | requires = ["poetry-core"] 57 | build-backend = "poetry.core.masonry.api" 58 | 59 | [[tool.poetry.packages]] 60 | include = "p115servedb" 61 | -------------------------------------------------------------------------------- /modules/p115servedb/readme.md: -------------------------------------------------------------------------------- 1 | # 115 网盘基于 p115updatedb 导出数据库的挂载服务 2 | 3 | ## 安装 4 | 5 | 你可以通过 [pypi](https://pypi.org/project/p115servedb/) 安装 6 | 7 | ```console 8 | pip install -U p115servedb 9 | ``` 10 | 11 | ## 用法 12 | 13 | ### 命令行使用 14 | 15 | #### 开启 webdav 16 | 17 | 挂载地址为 `/"] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115tiny302" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115tiny302" 10 | keywords = ["python-115", "302", "backend"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | blacksheep = "*" 31 | cachedict = ">=0.0.3" 32 | orjson = "*" 33 | p115client = ">=0.0.4.4.4" 34 | pyyaml = "*" 35 | rich = "*" 36 | uvicorn = "*" 37 | 38 | [tool.poetry.scripts] 39 | p115tiny302 = "p115tiny302.__main__:main" 40 | tiny302 = "p115tiny302.__main__:main" 41 | 42 | [build-system] 43 | requires = ["poetry-core"] 44 | build-backend = "poetry.core.masonry.api" 45 | 46 | [[tool.poetry.packages]] 47 | include = "p115tiny302" 48 | -------------------------------------------------------------------------------- /modules/p115updatedb/p115updatedb/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 10) 6 | __license__ = "GPLv3 " 7 | 8 | from .updatedb import * 9 | -------------------------------------------------------------------------------- /modules/p115updatedb/p115updatedb/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115updatedb/p115updatedb/py.typed -------------------------------------------------------------------------------- /modules/p115updatedb/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115updatedb" 3 | version = "0.0.11" 4 | description = "把 115 网盘的文件列表导出到数据库" 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb" 9 | repository = "https://github.com/ChenyangGao/p115client/tree/main/modules/p115updatedb" 10 | keywords = ["python-115", "updatedb"] 11 | classifiers = [ 12 | "License :: OSI Approved :: MIT License", 13 | "Development Status :: 5 - Production/Stable", 14 | "Programming Language :: Python", 15 | "Programming Language :: Python :: 3", 16 | "Programming Language :: Python :: 3.12", 17 | "Programming Language :: Python :: 3 :: Only", 18 | "Operating System :: OS Independent", 19 | "Intended Audience :: Developers", 20 | "Topic :: Software Development", 21 | "Topic :: Software Development :: Libraries", 22 | "Topic :: Software Development :: Libraries :: Python Modules", 23 | ] 24 | include = [ 25 | "LICENSE", 26 | ] 27 | 28 | [tool.poetry.dependencies] 29 | python = "^3.12" 30 | orjson = "*" 31 | p115client = ">=0.0.5.10" 32 | posixpatht = ">=0.0.4" 33 | python-concurrenttools = ">=0.0.8.2" 34 | python-iterutils = ">=0.1.11" 35 | sqlitetools = ">=0.0.3.2" 36 | 37 | [tool.poetry.scripts] 38 | p115updatedb = "p115updatedb.__main__:main" 39 | 40 | [build-system] 41 | requires = ["poetry-core"] 42 | build-backend = "poetry.core.masonry.api" 43 | 44 | [[tool.poetry.packages]] 45 | include = "p115updatedb" 46 | -------------------------------------------------------------------------------- /modules/p115updatedb/readme.md: -------------------------------------------------------------------------------- 1 | # 把 115 网盘的文件列表导出到数据库 2 | 3 | ## 安装 4 | 5 | 你可以通过 [pypi](https://pypi.org/project/p115updatedb/) 安装 6 | 7 | ```console 8 | pip install -U p115updatedb 9 | ``` 10 | 11 | ## 用法 12 | 13 | ### 模块 14 | 15 | ```python 16 | from p115updatedb import updatedb_life_iter, updatedb_life, updatedb, updatedb_one, updatedb_tree 17 | ``` 18 | 19 | 另外也提供了一些工具函数,封装了一些数据库查询 20 | 21 | ```python 22 | from p115updatedb.query import * 23 | ``` 24 | 25 | ### 命令行 26 | 27 | ```console 28 | $ p115updatedb -h 29 | usage: p115updatedb [-h] [-cp COOKIES_PATH] [-f DBFILE] [-i INTERVAL] 30 | [-st AUTO_SPLITTING_THRESHOLD] 31 | [-sst AUTO_SPLITTING_STATISTICS_TIMEOUT] [-nm] [-nr] [-de] 32 | [-v] [-l] 33 | [dir ...] 34 | 35 | 遍历 115 网盘的目录,并把信息导出到数据库 36 | 37 | positional arguments: 38 | dir 115 目录,可以传入多个,如果不传默认为 0 39 | 允许 3 种类型的目录 40 | 1. 整数,视为目录的 id 41 | 2. 形如 "/名字/名字/..." 的路径,最前面的 "/" 可以省略,本程序会尝试获取对应的 id 42 | 3. 形如 "根目录 > 名字 > 名字 > ..." 的路径,来自点击文件的【显示属性】,在【位置】这部分看到的路径,本程序会尝试获取对应的 id 43 | 44 | options: 45 | -h, --help show this help message and exit 46 | -cp COOKIES_PATH, --cookies-path COOKIES_PATH 47 | cookies 文件保存路径,默认为当前工作目录下的 115-cookies.txt 48 | -f DBFILE, --dbfile DBFILE 49 | sqlite 数据库文件路径,默认为在当前工作目录下的 f'115-{user_id}.db' 50 | -i INTERVAL, --interval INTERVAL 51 | 两个任务之间的睡眠时间,如果 <= 0,则不睡眠 52 | -st AUTO_SPLITTING_THRESHOLD, --auto-splitting-threshold AUTO_SPLITTING_THRESHOLD 53 | 自动拆分的文件数阈值,大于此值时,自动进行拆分,如果 = 0,则总是拆分,如果 < 0,则总是不拆分,默认值 100,000(10 万) 54 | -sst AUTO_SPLITTING_STATISTICS_TIMEOUT, --auto-splitting-statistics-timeout AUTO_SPLITTING_STATISTICS_TIMEOUT 55 | 自动拆分前的执行文件数统计的超时时间(秒),大于此值时,视为文件数无穷大,如果 <= 0,视为永不超时,默认值 3 56 | -nm, --no-dir-moved 声明没有目录被移动或改名(但可以有目录被新增或删除),这可以加快批量拉取时的速度 57 | -nr, --not-recursive 不遍历目录树:只拉取顶层目录,不递归子目录 58 | -de, --disable-event 关闭 event 表的数据收集 59 | -v, --version 输出版本号 60 | -l, --license 输出开源协议 61 | ``` 62 | -------------------------------------------------------------------------------- /modules/p115web/__main__.py: -------------------------------------------------------------------------------- 1 | from backend.main import main 2 | 3 | if __name__ == '__main__': 4 | main() 5 | -------------------------------------------------------------------------------- /modules/p115web/app.py: -------------------------------------------------------------------------------- 1 | from backend.main import main 2 | 3 | if __name__ == '__main__': 4 | main() 5 | -------------------------------------------------------------------------------- /modules/p115web/backend/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | if not os.environ.get("WORKDIR"): 3 | workdir = os.path.join(os.path.dirname( 4 | os.path.dirname(os.path.abspath(__file__))), 'data') 5 | else: 6 | workdir = os.environ.get("WORKDIR") 7 | if not os.path.exists(workdir): 8 | os.makedirs(workdir) 9 | log_dir = os.path.join(workdir, 'logs') 10 | if not os.path.exists(log_dir): 11 | os.makedirs(log_dir) 12 | conf_dir = os.path.join(workdir, 'conf') 13 | if not os.path.exists(conf_dir): 14 | os.makedirs(conf_dir) 15 | 16 | if not os.path.exists(f'{workdir}/115-cookies.txt'): 17 | with open(f'{workdir}/115-cookies.txt', 'w', encoding='utf-8') as file: 18 | file.write('') 19 | os.environ["WORKDIR"] = workdir -------------------------------------------------------------------------------- /modules/p115web/backend/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | def echo_author(): 5 | # http://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=p115%20web 6 | print(""" 7 | ██████╗ ██╗ ██╗███████╗ ██╗ ██╗███████╗██████╗ 8 | ██╔══██╗███║███║██╔════╝ ██║ ██║██╔════╝██╔══██╗ 9 | ██████╔╝╚██║╚██║███████╗ ██║ █╗ ██║█████╗ ██████╔╝ 10 | ██╔═══╝ ██║ ██║╚════██║ ██║███╗██║██╔══╝ ██╔══██╗ 11 | ██║ ██║ ██║███████║ ╚███╔███╔╝███████╗██████╔╝ 12 | ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ 13 | """) 14 | 15 | def startup(): 16 | echo_author() 17 | print(f'程序启动成功') 18 | 19 | def main(): 20 | from .file_lister import main 21 | startup() 22 | main() 23 | 24 | if __name__ == "__main__": 25 | from pathlib import Path 26 | from sys import path 27 | 28 | path[0] = str(Path(__file__).parents[1]) 29 | main() 30 | 31 | # TODO: 后端使用 p115dav + 一个扩展的前端 32 | 33 | -------------------------------------------------------------------------------- /modules/p115web/data/115-cookies.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/data/115-cookies.txt -------------------------------------------------------------------------------- /modules/p115web/frontend/.env: -------------------------------------------------------------------------------- 1 | # 可以添加一个 .env.local 文件,所有情况下都会加载,但会被 git 忽略 2 | # https://cn.vitejs.dev/guide/env-and-mode#env-files 3 | VITE_API_URL = http://127.0.0.1:9115 -------------------------------------------------------------------------------- /modules/p115web/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmmirror.com/ -------------------------------------------------------------------------------- /modules/p115web/frontend/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | 运行调试 4 | ```bash 5 | make dev 6 | 7 | ``` 8 | 9 | 10 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 11 | 12 | Currently, two official plugins are available: 13 | 14 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 15 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 16 | 17 | ## Expanding the ESLint configuration 18 | 19 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 20 | 21 | - Configure the top-level `parserOptions` property like this: 22 | 23 | ```js 24 | export default { 25 | // other rules... 26 | parserOptions: { 27 | ecmaVersion: 'latest', 28 | sourceType: 'module', 29 | project: ['./tsconfig.json', './tsconfig.node.json'], 30 | tsconfigRootDir: __dirname, 31 | }, 32 | } 33 | ``` 34 | 35 | - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` 36 | - Optionally add `plugin:@typescript-eslint/stylistic-type-checked` 37 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list 38 | -------------------------------------------------------------------------------- /modules/p115web/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 19 | 20 | 24 | 25 | 26 | 115 FileLister 27 | 28 | 29 | 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /modules/p115web/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@ant-design/icons": "^5.4.0", 14 | "antd": "^5.14.0", 15 | "artplayer": "^5.1.6", 16 | "artplayer-plugin-hls-quality": "^2.0.0", 17 | "axios": "^1.6.7", 18 | "dayjs": "^1.11.12", 19 | "highlight.js": "^11.9.0", 20 | "hls.js": "^1.5.13", 21 | "lodash-es": "^4.17.21", 22 | "mobx": "^6.12.1", 23 | "mobx-react": "^9.1.0", 24 | "prismjs": "^1.29.0", 25 | "qs": "^6.12.0", 26 | "react": "^18.2.0", 27 | "react-dom": "^18.2.0", 28 | "react-router-dom": "^6.22.0", 29 | "react-waypoint": "^10.3.0", 30 | "styled-components": "^6.1.8", 31 | "swr": "^2.2.5", 32 | "xterm": "^5.3.0", 33 | "xterm-addon-canvas": "^0.5.0", 34 | "xterm-addon-fit": "^0.8.0", 35 | "xterm-addon-search": "^0.13.0", 36 | "xterm-addon-web-links": "^0.9.0", 37 | "xterm-addon-webgl": "^0.16.0" 38 | }, 39 | "devDependencies": { 40 | "@types/lodash-es": "^4.17.12", 41 | "@types/node": "^20.11.16", 42 | "@types/prismjs": "^1.26.3", 43 | "@types/qs": "^6.9.14", 44 | "@types/react": "^18.2.54", 45 | "@types/react-dom": "^18.2.18", 46 | "@types/react-router-dom": "^5.3.3", 47 | "@typescript-eslint/eslint-plugin": "^6.21.0", 48 | "@typescript-eslint/parser": "^6.21.0", 49 | "@vitejs/plugin-react": "^4.2.1", 50 | "autoprefixer": "^10.4.17", 51 | "eslint": "^8.56.0", 52 | "eslint-plugin-react-hooks": "^4.6.0", 53 | "eslint-plugin-react-refresh": "^0.4.5", 54 | "postcss-import": "^16.1.0", 55 | "tailwindcss": "^3.4.1", 56 | "typescript": "^5.3.3", 57 | "vite": "^5.0.12", 58 | "vite-plugin-svgr": "^4.2.0" 59 | }, 60 | "volta": { 61 | "node": "20.15.0" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/icon.png -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/archive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/artplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/img/artplayer.png -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/audio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/code.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/db.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/default.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/ebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/excel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/img/fig.png -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/fileball.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/iina.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/infuse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/mpv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/img/mpv.png -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/mxplayer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/nfo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/nplayer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/omni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/img/omni.png -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/pdf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/ppt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 12 | 14 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/vlc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/img/word.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "115FileLister", 3 | "name": "115FileLister", 4 | "icons": [ 5 | { 6 | "src": "/icon.png", 7 | "sizes": "any", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "/", 12 | "display": "standalone", 13 | "theme_color": "#171717", 14 | "background_color": "#171717" 15 | } -------------------------------------------------------------------------------- /modules/p115web/frontend/public/poppins.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/public/poppins.otf -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "iconfont"; /* Project id 4481671 */ 3 | src: url('iconfont.woff2?t=1711384457279') format('woff2'), 4 | url('iconfont.woff?t=1711384457279') format('woff'), 5 | url('iconfont.ttf?t=1711384457279') format('truetype'), 6 | url('iconfont.svg?t=1711384457279#iconfont') format('svg'); 7 | } 8 | 9 | .iconfont { 10 | font-family: "iconfont" !important; 11 | font-size: 16px; 12 | font-style: normal; 13 | -webkit-font-smoothing: antialiased; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | .icon-podcast:before { 18 | content: "\e61d"; 19 | } 20 | 21 | .icon-logs:before { 22 | content: "\e619"; 23 | } 24 | 25 | .icon-arrange:before { 26 | content: "\e61a"; 27 | } 28 | 29 | .icon-subscribe:before { 30 | content: "\e61b"; 31 | } 32 | 33 | .icon-settings:before { 34 | content: "\e61c"; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "4481671", 3 | "name": "115FileLister", 4 | "font_family": "iconfont", 5 | "css_prefix_text": "icon-", 6 | "description": "", 7 | "glyphs": [ 8 | { 9 | "icon_id": "39690943", 10 | "name": "podcast", 11 | "font_class": "podcast", 12 | "unicode": "e61d", 13 | "unicode_decimal": 58909 14 | }, 15 | { 16 | "icon_id": "39690905", 17 | "name": "logs", 18 | "font_class": "logs", 19 | "unicode": "e619", 20 | "unicode_decimal": 58905 21 | }, 22 | { 23 | "icon_id": "39690906", 24 | "name": "arrange", 25 | "font_class": "arrange", 26 | "unicode": "e61a", 27 | "unicode_decimal": 58906 28 | }, 29 | { 30 | "icon_id": "39690907", 31 | "name": "subscribe", 32 | "font_class": "subscribe", 33 | "unicode": "e61b", 34 | "unicode_decimal": 58907 35 | }, 36 | { 37 | "icon_id": "39690909", 38 | "name": "settings", 39 | "font_class": "settings", 40 | "unicode": "e61c", 41 | "unicode_decimal": 58908 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.woff -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/frontend/src/assets/fonts/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/attr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/desc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/m3u8.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 9 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/assets/icon/spin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/enums/httpEnum.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: Request result set 3 | */ 4 | export enum ResultEnum { 5 | SUCCESS = 0, 6 | ERROR = -1, 7 | TIMEOUT = 401, 8 | TYPE = "success", 9 | } 10 | 11 | /** 12 | * @description: request method 13 | */ 14 | export enum RequestEnum { 15 | GET = "GET", 16 | POST = "POST", 17 | PUT = "PUT", 18 | DELETE = "DELETE", 19 | } 20 | 21 | /** 22 | * @description: contentType 23 | */ 24 | export enum ContentTypeEnum { 25 | // json 26 | JSON = "application/json;charset=UTF-8", 27 | // form-data qs 28 | FORM_URLENCODED = "application/x-www-form-urlencoded;charset=UTF-8", 29 | // form-data upload 30 | FORM_DATA = "multipart/form-data;charset=UTF-8", 31 | } 32 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/hooks/useIsMobile.ts: -------------------------------------------------------------------------------- 1 | // 定义一个hook来检测是否为移动设备 2 | import { useEffect, useState } from "react"; 3 | 4 | // 定义移动设备的正则表达式,用来检测用户代理字符串 5 | const mobileDeviceRegex = 6 | /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i; 7 | 8 | // 使用React Hook来创建这个功能 9 | export const useIsMobile = (): boolean => { 10 | const [isMobile, setIsMobile] = useState(false); 11 | 12 | useEffect(() => { 13 | // 检查用户代理字符串 14 | const userAgent = 15 | typeof window.navigator === "undefined" ? "" : navigator.userAgent; 16 | // 设置状态为true如果是移动设备 17 | setIsMobile(mobileDeviceRegex.test(userAgent)); 18 | }, []); 19 | 20 | return isMobile; 21 | }; 22 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/hooks/useMessage.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { MessageContext } from "/@/routes"; 3 | 4 | export const useMessage = () => { 5 | const messageApi = useContext(MessageContext); 6 | const config = { 7 | style: { 8 | marginTop: "90px", 9 | } 10 | }; 11 | const success = (content: string) => { 12 | return messageApi?.success({ 13 | ...config, 14 | content, 15 | }); 16 | }; 17 | 18 | const warning = (content: string) => { 19 | return messageApi?.warning({ 20 | ...config, 21 | content, 22 | }); 23 | }; 24 | 25 | const error = (content: string) => { 26 | return messageApi?.error({ 27 | ...config, 28 | content, 29 | }); 30 | }; 31 | 32 | return { 33 | success, 34 | warning, 35 | error, 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/hooks/useRandomId.ts: -------------------------------------------------------------------------------- 1 | const useRandomId = () => { 2 | let d = new Date().getTime(); //获取当前时间 3 | if ( 4 | typeof performance !== "undefined" && 5 | typeof performance.now === "function" 6 | ) { 7 | d += performance.now(); //使用高精度时间 8 | } 9 | return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { 10 | const r = (d + Math.random() * 16) % 16 | 0; 11 | d = Math.floor(d / 16); 12 | return (c === "x" ? r : (r & 0x3) | 0x8).toString(16); 13 | }); 14 | }; 15 | export default useRandomId; 16 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/http/axiosCancel.ts: -------------------------------------------------------------------------------- 1 | import type { AxiosRequestConfig } from "axios"; 2 | 3 | // 用于存储每个请求的标识和取消函数 4 | const pendingMap = new Map(); 5 | 6 | const getPendingUrl = (config: AxiosRequestConfig): string => { 7 | return [config.method, config.url].join("&"); 8 | }; 9 | 10 | export class AxiosCanceler { 11 | /** 12 | * 添加请求 13 | * @param config 请求配置 14 | */ 15 | public addPending(config: AxiosRequestConfig): void { 16 | this.removePending(config); 17 | const url = getPendingUrl(config); 18 | const controller = new AbortController(); 19 | config.signal = config.signal || controller.signal; 20 | if (!pendingMap.has(url)) { 21 | // 如果当前请求不在等待中,将其添加到等待中 22 | pendingMap.set(url, controller); 23 | } 24 | } 25 | 26 | /** 27 | * 清除所有等待中的请求 28 | */ 29 | public removeAllPending(): void { 30 | pendingMap.forEach((abortController) => { 31 | if (abortController) { 32 | abortController.abort(); 33 | } 34 | }); 35 | this.reset(); 36 | } 37 | 38 | /** 39 | * 移除请求 40 | * @param config 请求配置 41 | */ 42 | public removePending(config: AxiosRequestConfig): void { 43 | const url = getPendingUrl(config); 44 | if (pendingMap.has(url)) { 45 | // 如果当前请求在等待中,取消它并将其从等待中移除 46 | const abortController = pendingMap.get(url); 47 | if (abortController) { 48 | abortController.abort(url); 49 | } 50 | pendingMap.delete(url); 51 | } 52 | } 53 | 54 | /** 55 | * 重置 56 | */ 57 | public reset(): void { 58 | pendingMap.clear(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/http/axiosRetry.ts: -------------------------------------------------------------------------------- 1 | import { AxiosError, AxiosInstance } from "axios"; 2 | /** 3 | * 请求重试机制 4 | */ 5 | 6 | export class AxiosRetry { 7 | /** 8 | * 重试 9 | */ 10 | retry(axiosInstance: AxiosInstance, error: AxiosError) { 11 | // @ts-ignore 12 | const { config } = error.response; 13 | const { waitTime, count } = config?.requestOptions?.retryRequest ?? {}; 14 | config.__retryCount = config.__retryCount || 0; 15 | if (config.__retryCount >= count) { 16 | return Promise.reject(error); 17 | } 18 | config.__retryCount += 1; 19 | //请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers 20 | delete config.headers; 21 | return this.delay(waitTime).then(() => axiosInstance(config)); 22 | } 23 | 24 | /** 25 | * 延迟 26 | */ 27 | private delay(waitTime: number) { 28 | return new Promise((resolve) => setTimeout(resolve, waitTime)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/http/axiosTransform.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Data processing class, can be configured according to the project 3 | */ 4 | import type { 5 | AxiosInstance, 6 | AxiosRequestConfig, 7 | AxiosResponse, 8 | InternalAxiosRequestConfig, 9 | } from "axios"; 10 | import type { RequestOptions, Result } from "#/axios"; 11 | 12 | export interface CreateAxiosOptions extends AxiosRequestConfig { 13 | authenticationScheme?: string; 14 | transform?: AxiosTransform; 15 | requestOptions?: RequestOptions; 16 | } 17 | 18 | export abstract class AxiosTransform { 19 | /** 20 | * A function that is called before a request is sent. It can modify the request configuration as needed. 21 | * 在发送请求之前调用的函数。它可以根据需要修改请求配置。 22 | */ 23 | beforeRequestHook?: ( 24 | config: AxiosRequestConfig, 25 | options: RequestOptions 26 | ) => AxiosRequestConfig; 27 | 28 | /** 29 | * @description: 处理响应数据 30 | */ 31 | transformResponseHook?: ( 32 | res: AxiosResponse, 33 | options: RequestOptions 34 | ) => any; 35 | 36 | /** 37 | * @description: 请求失败处理 38 | */ 39 | requestCatchHook?: (e: Error, options: RequestOptions) => Promise; 40 | 41 | /** 42 | * @description: 请求之前的拦截器 43 | */ 44 | requestInterceptors?: ( 45 | config: InternalAxiosRequestConfig, 46 | options: CreateAxiosOptions 47 | ) => InternalAxiosRequestConfig; 48 | 49 | /** 50 | * @description: 请求之后的拦截器 51 | */ 52 | responseInterceptors?: (res: AxiosResponse) => AxiosResponse; 53 | 54 | /** 55 | * @description: 请求之前的拦截器错误处理 56 | */ 57 | requestInterceptorsCatch?: (error: Error) => void; 58 | 59 | /** 60 | * @description: 请求之后的拦截器错误处理 61 | */ 62 | responseInterceptorsCatch?: ( 63 | axiosInstance: AxiosInstance, 64 | error: Error 65 | ) => void; 66 | } 67 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/http/checkStatus.ts: -------------------------------------------------------------------------------- 1 | import { ErrorMessageMode } from "#/axios"; 2 | import { message as AntMessage } from "antd"; 3 | 4 | export function checkStatus( 5 | status: number, 6 | msg: string, 7 | errorMessageMode: ErrorMessageMode = "message" 8 | ): void { 9 | let errMessage = ""; 10 | 11 | switch (status) { 12 | case 400: 13 | errMessage = `${msg}`; 14 | break; 15 | // 401: Not logged in 16 | // Jump to the login page if not logged in, and carry the path of the current page 17 | // Return to the current page after successful login. This step needs to be operated on the login page. 18 | case 401: 19 | errMessage = msg || "sys.api.errMsg401"; 20 | break; 21 | case 403: 22 | errMessage = "sys.api.errMsg403"; 23 | break; 24 | // 404请求不存在 25 | case 404: 26 | errMessage = "sys.api.errMsg404"; 27 | break; 28 | case 405: 29 | errMessage = "sys.api.errMsg405"; 30 | break; 31 | case 408: 32 | errMessage = "sys.api.errMsg408"; 33 | break; 34 | case 500: 35 | errMessage = "sys.api.errMsg500"; 36 | break; 37 | case 501: 38 | errMessage = "sys.api.errMsg501"; 39 | break; 40 | case 502: 41 | errMessage = "sys.api.errMsg502"; 42 | break; 43 | case 503: 44 | errMessage = "sys.api.errMsg503"; 45 | break; 46 | case 504: 47 | errMessage = "sys.api.errMsg504"; 48 | break; 49 | case 505: 50 | errMessage = "sys.api.errMsg505"; 51 | break; 52 | default: 53 | } 54 | 55 | if (errMessage && errorMessageMode === "message") { 56 | AntMessage.error(errMessage); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/http/helper.ts: -------------------------------------------------------------------------------- 1 | import { isObject, isString } from "/@/utils/is"; 2 | 3 | const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss"; 4 | 5 | export function joinTimestamp( 6 | join: boolean, 7 | restful: T 8 | ): T extends true ? string : object; 9 | 10 | export function joinTimestamp(join: boolean, restful = false): string | object { 11 | if (!join) { 12 | return restful ? "" : {}; 13 | } 14 | const now = new Date().getTime(); 15 | if (restful) { 16 | return `?_t=${now}`; 17 | } 18 | return { _t: now }; 19 | } 20 | 21 | /** 22 | * @description: Format request parameter time 23 | */ 24 | export function formatRequestDate(params: Recordable) { 25 | if (Object.prototype.toString.call(params) !== "[object Object]") { 26 | return; 27 | } 28 | 29 | for (const key in params) { 30 | const format = params[key]?.format ?? null; 31 | if (format && typeof format === "function") { 32 | params[key] = params[key].format(DATE_TIME_FORMAT); 33 | } 34 | if (isString(key)) { 35 | const value = params[key]; 36 | if (value) { 37 | try { 38 | params[key] = isString(value) ? value.trim() : value; 39 | } catch (error: any) { 40 | throw new Error(error); 41 | } 42 | } 43 | } 44 | if (isObject(params[key])) { 45 | formatRequestDate(params[key]); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/layout/components/header.tsx: -------------------------------------------------------------------------------- 1 | const Header: React.FC = () => { 2 | return ( 3 |
4 | logo 5 |
9 | 115 FileLister 10 |
11 |
12 | ); 13 | }; 14 | 15 | export default Header; 16 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/layout/index.tsx: -------------------------------------------------------------------------------- 1 | import { ConfigProvider } from "antd"; 2 | import React from "react"; 3 | import { Outlet } from "react-router-dom"; 4 | import Header from "/@/layout/components/header"; 5 | import zhCN from "antd/lib/locale/zh_CN"; 6 | 7 | const BasicLayout: React.FC = () => { 8 | return ( 9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 |
17 | ); 18 | }; 19 | 20 | export default BasicLayout; 21 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import { BrowserRouter } from "react-router-dom"; 4 | import Routes from "/@/routes"; 5 | import "./assets/fonts/iconfont/iconfont"; 6 | import "./index.css"; 7 | 8 | const element = document.getElementById("root"); 9 | 10 | const safeAreaInsetTop = getComputedStyle( 11 | document.documentElement 12 | ).getPropertyValue("--safe-area-inset-top"); 13 | 14 | // 注入安全区域 15 | document.documentElement.style.paddingTop = 16 | safeAreaInsetTop === "0px" ? "16px" : safeAreaInsetTop; 17 | 18 | if (element) { 19 | const App = () => ( 20 | //严格模式会在开发环境令组件渲染两次(非开发环境不受影响) 21 | 22 | 23 | 24 | 25 | 26 | ); 27 | const root = createRoot(element); 28 | root.render(); 29 | } 30 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/routes/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Routes, Route, Outlet } from "react-router-dom"; 3 | import Layout from "/@/layout"; 4 | import { ConfigProvider, Result, Spin, message } from "antd"; 5 | import { createContext } from "react"; 6 | import { Router } from "./router"; 7 | import zhCN from "antd/lib/locale/zh_CN"; 8 | import { MessageInstance } from "antd/es/message/interface"; 9 | 10 | export const MessageContext = createContext(null); 11 | 12 | const Config = () => { 13 | const [messageApi, contextHolder] = message.useMessage(); 14 | 15 | return ( 16 | 17 | 18 | {contextHolder} 19 | 20 | 21 | 22 | ); 23 | }; 24 | 25 | const BasicRoutes = () => { 26 | return ( 27 | }> 28 | 29 | }> 30 | }> 31 | {Router?.map(({ element, path }) => ( 32 | 33 | ))} 34 | 35 | 43 | } 44 | /> 45 | 49 | } 50 | /> 51 | 59 | } 60 | /> 61 | 62 | 63 | 64 | ); 65 | }; 66 | 67 | export default BasicRoutes; 68 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/routes/router.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Index from "/@/views/index"; 3 | import Player from "/@/views/player"; 4 | 5 | interface T { 6 | path: string; 7 | element: React.ReactNode; 8 | children?: Array; 9 | } 10 | 11 | export const Router: Array = [ 12 | { 13 | path: "/", 14 | element: , 15 | }, 16 | { 17 | path: "/player", 18 | element: , 19 | }, 20 | ]; 21 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { intersectionWith, isEqual, mergeWith, unionWith } from "lodash-es"; 2 | import { isArray, isObject } from "/@/utils/is"; 3 | 4 | export const noop = () => {}; 5 | 6 | /** 7 | * @description: Set ui mount node 8 | */ 9 | export function getPopupContainer(node?: HTMLElement): HTMLElement { 10 | return (node?.parentNode as HTMLElement) ?? document.body; 11 | } 12 | 13 | /** 14 | * Add the object as a parameter to the URL 15 | * @param baseUrl url 16 | * @param obj 17 | * @returns {string} 18 | * eg: 19 | * let obj = {a: '3', b: '4'} 20 | * setObjToUrlParams('www.baidu.com', obj) 21 | * ==>www.baidu.com?a=3&b=4 22 | */ 23 | export function setObjToUrlParams(baseUrl: string, obj: any): string { 24 | let parameters = ""; 25 | for (const key in obj) { 26 | parameters += key + "=" + encodeURIComponent(obj[key]) + "&"; 27 | } 28 | parameters = parameters.replace(/&$/, ""); 29 | return /\?$/.test(baseUrl) 30 | ? baseUrl + parameters 31 | : baseUrl.replace(/\/?$/, "?") + parameters; 32 | } 33 | 34 | /** 35 | * Recursively merge two objects. 36 | * 递归合并两个对象。 37 | * 38 | * @param source The source object to merge from. 要合并的源对象。 39 | * @param target The target object to merge into. 目标对象,合并后结果存放于此。 40 | * @param mergeArrays How to merge arrays. Default is "replace". 41 | * 如何合并数组。默认为replace。 42 | * - "union": Union the arrays. 对数组执行并集操作。 43 | * - "intersection": Intersect the arrays. 对数组执行交集操作。 44 | * - "concat": Concatenate the arrays. 连接数组。 45 | * - "replace": Replace the source array with the target array. 用目标数组替换源数组。 46 | * @returns The merged object. 合并后的对象。 47 | */ 48 | export function deepMerge< 49 | T extends object | null | undefined, 50 | U extends object | null | undefined 51 | >( 52 | source: T, 53 | target: U, 54 | mergeArrays: "union" | "intersection" | "concat" | "replace" = "replace" 55 | ): T & U { 56 | if (!target) { 57 | return source as T & U; 58 | } 59 | if (!source) { 60 | return target as T & U; 61 | } 62 | return mergeWith({}, source, target, (sourceValue, targetValue) => { 63 | if (isArray(targetValue) && isArray(sourceValue)) { 64 | switch (mergeArrays) { 65 | case "union": 66 | return unionWith(sourceValue, targetValue, isEqual); 67 | case "intersection": 68 | return intersectionWith(sourceValue, targetValue, isEqual); 69 | case "concat": 70 | return sourceValue.concat(targetValue); 71 | case "replace": 72 | return targetValue; 73 | default: 74 | throw new Error( 75 | `Unknown merge array strategy: ${mergeArrays as string}` 76 | ); 77 | } 78 | } 79 | if (isObject(targetValue) && isObject(sourceValue)) { 80 | return deepMerge(sourceValue, targetValue, mergeArrays); 81 | } 82 | return undefined; 83 | }); 84 | } 85 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/utils/is.ts: -------------------------------------------------------------------------------- 1 | export { 2 | isArguments, 3 | isArrayBuffer, 4 | isArrayLike, 5 | isArrayLikeObject, 6 | isBuffer, 7 | isBoolean, 8 | isDate, 9 | isElement, 10 | isEmpty, 11 | isEqual, 12 | isEqualWith, 13 | isError, 14 | isFunction, 15 | isFinite, 16 | isLength, 17 | isMap, 18 | isMatch, 19 | isMatchWith, 20 | isNative, 21 | isNil, 22 | isNumber, 23 | isNull, 24 | isObjectLike, 25 | isPlainObject, 26 | isRegExp, 27 | isSafeInteger, 28 | isSet, 29 | isString, 30 | isSymbol, 31 | isTypedArray, 32 | isUndefined, 33 | isWeakMap, 34 | isWeakSet, 35 | } from "lodash-es"; 36 | const toString = Object.prototype.toString; 37 | 38 | export function is(val: unknown, type: string) { 39 | return toString.call(val) === `[object ${type}]`; 40 | } 41 | 42 | export function isDef(val?: T): val is T { 43 | return typeof val !== "undefined"; 44 | } 45 | 46 | // TODO 此处 isObject 存在歧义 47 | export function isObject(val: any): val is Record { 48 | return val !== null && is(val, "Object"); 49 | } 50 | 51 | // TODO 此处 isArray 存在歧义 52 | export function isArray(val: any): val is Array { 53 | return val && Array.isArray(val); 54 | } 55 | 56 | export function isWindow(val: any): val is Window { 57 | return typeof window !== "undefined" && is(val, "Window"); 58 | } 59 | 60 | export const isServer = typeof window === "undefined"; 61 | 62 | export const isClient = !isServer; 63 | 64 | export function isHttpUrl(path: string): boolean { 65 | const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/; 66 | return reg.test(path); 67 | } 68 | 69 | export function isPascalCase(str: string): boolean { 70 | const regex = /^[A-Z][A-Za-z]*$/; 71 | return regex.test(str); 72 | } 73 | -------------------------------------------------------------------------------- /modules/p115web/frontend/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /modules/p115web/frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | corePlugins: { 9 | preflight: false, // 禁用掉 Tailwind 的 Preflight(基础样式重置) 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /modules/p115web/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | "experimentalDecorators": true, 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "baseUrl": "./", 23 | "paths": { 24 | "/@/*": [ 25 | "src/*" 26 | ], 27 | "#/*": ["types/*"] 28 | } 29 | }, 30 | "include": ["src", "types/**/*.d.ts",], 31 | "references": [{ "path": "./tsconfig.node.json" }] 32 | } 33 | -------------------------------------------------------------------------------- /modules/p115web/frontend/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /modules/p115web/frontend/types/axios.d.ts: -------------------------------------------------------------------------------- 1 | export type ErrorMessageMode = "none" | "modal" | "message" | undefined; 2 | export type SuccessMessageMode = ErrorMessageMode; 3 | 4 | export interface RequestOptions { 5 | // Splicing request parameters to url 6 | joinParamsToUrl?: boolean; 7 | // Format request parameter time 8 | formatDate?: boolean; 9 | // Whether to process the request result 10 | isTransformResponse?: boolean; 11 | // Whether to return native response headers 12 | // For example: use this attribute when you need to get the response headers 13 | isReturnNativeResponse?: boolean; 14 | // Whether to join url 15 | joinPrefix?: boolean; 16 | // Interface address, use the default apiUrl if you leave it blank 17 | apiUrl?: string; 18 | // 请求拼接路径 19 | urlPrefix?: string; 20 | // Error message prompt type 21 | errorMessageMode?: ErrorMessageMode; 22 | // Success message prompt type 23 | successMessageMode?: SuccessMessageMode; 24 | // Whether to add a timestamp 25 | joinTime?: boolean; 26 | ignoreCancelToken?: boolean; 27 | // Whether to send token in header 28 | withToken?: boolean; 29 | // 请求重试机制 30 | retryRequest?: RetryRequest; 31 | } 32 | 33 | export interface RetryRequest { 34 | isOpenRetry: boolean; 35 | count: number; 36 | waitTime: number; 37 | } 38 | export interface Result { 39 | code: number; 40 | type: "success" | "error" | "warning"; 41 | message: string; 42 | data: T; 43 | } 44 | 45 | // multipart/form-data: upload file 46 | export interface UploadFileParams { 47 | // Other parameters 48 | data?: Recordable; 49 | // File parameter interface field name 50 | name?: string; 51 | // file name 52 | file: File | Blob; 53 | // file name 54 | filename?: string; 55 | [key: string]: any; 56 | } 57 | -------------------------------------------------------------------------------- /modules/p115web/frontend/types/index.d.ts: -------------------------------------------------------------------------------- 1 | type Recordable = Record; 2 | 3 | interface LoginFormValues { 4 | username: string; 5 | password: string; 6 | } 7 | -------------------------------------------------------------------------------- /modules/p115web/frontend/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, loadEnv } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | import { resolve } from "path"; 4 | import tailwindcss from "tailwindcss"; 5 | import autoprefixer from "autoprefixer"; 6 | import svgr from "vite-plugin-svgr"; 7 | import tailwindcssNesting from "tailwindcss/nesting"; 8 | import postcssImport from "postcss-import"; 9 | 10 | function pathResolve(dir: string) { 11 | return resolve(process.cwd(), ".", dir); 12 | } 13 | 14 | // https://vitejs.dev/config/ 15 | export default defineConfig(({ mode }) => { 16 | process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }; 17 | 18 | return { 19 | root: "./", 20 | base: "/", 21 | publicDir: "public", 22 | plugins: [svgr(), react()], 23 | resolve: { 24 | alias: [ 25 | { 26 | find: /\/@\//, 27 | replacement: pathResolve("src") + "/", 28 | }, 29 | ], 30 | }, 31 | server: { 32 | host: true, 33 | port: 3000, 34 | // open: true, 35 | proxy: { 36 | "/api": { 37 | target: process.env.VITE_API_URL, 38 | changeOrigin: true, 39 | secure: false, 40 | }, 41 | "/ws": { 42 | target: "ws://127.0.0.1", 43 | ws: true, 44 | }, 45 | }, 46 | }, 47 | build: { 48 | target: "es2015", 49 | cssTarget: "chrome80", 50 | outDir: "dist", 51 | }, 52 | css: { 53 | postcss: { 54 | plugins: [postcssImport, tailwindcssNesting, tailwindcss, autoprefixer], 55 | }, 56 | }, 57 | }; 58 | }); 59 | -------------------------------------------------------------------------------- /modules/p115web/makefile: -------------------------------------------------------------------------------- 1 | #安装后端依赖 2 | install-py: 3 | pip3 install -U -r requirements.txt 4 | 5 | #安装前端依赖 6 | install-f: 7 | cd frontend && pnpm i 8 | 9 | #启动前端 10 | dev-f: 11 | cd frontend && pnpm dev & 12 | 13 | #启动后端 14 | dev-b: 15 | python3 start.py 16 | 17 | #前端打包 18 | build: 19 | cd frontend && npm run build 20 | 21 | #启动前后端 22 | dev:dev-f dev-b 23 | 24 | #安装前后端依赖 25 | install:install-py install-f 26 | 27 | #启动前后端 28 | dev2: 29 | concurrently --kill-others-on-fail "make dev-f" "make dev-b" 30 | dev-b2: 31 | concurrently --kill-others-on-fail "make dev-b" 32 | 33 | #安装后端依赖2 34 | install-py2: 35 | concurrently --kill-others-on-fail "make install-py" 36 | -------------------------------------------------------------------------------- /modules/p115web/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/icon.png -------------------------------------------------------------------------------- /modules/p115web/static/img/archive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/artplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/img/artplayer.png -------------------------------------------------------------------------------- /modules/p115web/static/img/audio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /modules/p115web/static/img/code.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/p115web/static/img/db.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /modules/p115web/static/img/default.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/ebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/p115web/static/img/excel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/img/fig.png -------------------------------------------------------------------------------- /modules/p115web/static/img/fileball.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/p115web/static/img/folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/p115web/static/img/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /modules/p115web/static/img/iina.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /modules/p115web/static/img/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/infuse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /modules/p115web/static/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /modules/p115web/static/img/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/mpv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/img/mpv.png -------------------------------------------------------------------------------- /modules/p115web/static/img/mxplayer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /modules/p115web/static/img/nfo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/p115web/static/img/nplayer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /modules/p115web/static/img/omni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/img/omni.png -------------------------------------------------------------------------------- /modules/p115web/static/img/pdf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/ppt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/img/text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 12 | 14 | 16 | 18 | 19 | -------------------------------------------------------------------------------- /modules/p115web/static/img/video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/p115web/static/img/vlc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /modules/p115web/static/img/word.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/p115web/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 19 | 20 | 24 | 25 | 26 | 115 FileLister 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /modules/p115web/static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "115FileLister", 3 | "name": "115FileLister", 4 | "icons": [ 5 | { 6 | "src": "/icon.png", 7 | "sizes": "any", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "/", 12 | "display": "standalone", 13 | "theme_color": "#171717", 14 | "background_color": "#171717" 15 | } -------------------------------------------------------------------------------- /modules/p115web/static/poppins.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/modules/p115web/static/poppins.otf -------------------------------------------------------------------------------- /modules/p115web/todo.md: -------------------------------------------------------------------------------- 1 | 1. 这是 p115dav 以后的版本 2 | 2. 代码要尽量简化 3 | 4 | -------------------------------------------------------------------------------- /p115client/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | __version__ = (0, 0, 5) 6 | 7 | from .client import * 8 | from .const import * 9 | from .exception import * 10 | from .type import * 11 | -------------------------------------------------------------------------------- /p115client/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenyangGao/p115client/e77ab9e7b74e4188d8e944ac63c157b28505d679/p115client/py.typed -------------------------------------------------------------------------------- /p115client/tool/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # encoding: utf-8 3 | 4 | __author__ = "ChenyangGao " 5 | 6 | from .attr import * 7 | from .download import * 8 | from .edit import * 9 | from .export_dir import * 10 | from .fs_files import * 11 | from .history import * 12 | from .iterdir import * 13 | from .life import * 14 | from .pool import * 15 | from .request import * 16 | from .upload import * 17 | from .util import * 18 | from .xys import * 19 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "p115client" 3 | version = "0.0.5.11" 4 | description = "Python 115 webdisk client." 5 | authors = ["ChenyangGao "] 6 | license = "MIT" 7 | readme = "readme.md" 8 | homepage = "https://github.com/ChenyangGao/p115client" 9 | repository = "https://github.com/ChenyangGao/p115client" 10 | documentation = "https://p115client.readthedocs.io" 11 | keywords = ["115", "webdisk", "client"] 12 | classifiers = [ 13 | "License :: OSI Approved :: MIT License", 14 | "Development Status :: 4 - Beta", 15 | "Programming Language :: Python", 16 | "Programming Language :: Python :: 3", 17 | "Programming Language :: Python :: 3.12", 18 | "Programming Language :: Python :: 3 :: Only", 19 | "Operating System :: OS Independent", 20 | "Intended Audience :: Developers", 21 | "Topic :: Software Development", 22 | "Topic :: Software Development :: Libraries", 23 | "Topic :: Software Development :: Libraries :: Python Modules", 24 | ] 25 | include = [ 26 | "LICENSE", 27 | ] 28 | 29 | [tool.poetry.dependencies] 30 | python = "^3.12" 31 | aiofile = "*" 32 | ed2k = ">=0.0.2.1" 33 | http_response = ">=0.0.2.2" 34 | httpx = ">=0.28" 35 | httpx_request = ">=0.1.4" 36 | iter_collect = ">=0.0.5.1" 37 | multidict = "*" 38 | orjson = "*" 39 | p115cipher = ">=0.0.3" 40 | posixpatht = ">=0.0.3" 41 | python-argtools = ">=0.0.1" 42 | python-asynctools = ">=0.1.2" 43 | python-concurrenttools = ">=0.0.8.2" 44 | python-cookietools = ">=0.0.2.1" 45 | python-dictattr = ">=0.0.4" 46 | python-encode_uri = ">=0.0.1" 47 | python-filewrap = ">=0.2.8" 48 | python-hashtools = ">=0.0.3.3" 49 | python-httpfile = ">=0.0.5.2" 50 | python-http_request = ">=0.0.6" 51 | python-iterutils = ">=0.2" 52 | python-property = ">=0.0.3" 53 | python-startfile = ">=0.0.2" 54 | python-undefined = ">=0.0.3" 55 | qrcode = "*" 56 | yarl = "*" 57 | 58 | [build-system] 59 | requires = ["poetry-core"] 60 | build-backend = "poetry.core.masonry.api" 61 | 62 | [[tool.poetry.packages]] 63 | include = "p115client" 64 | --------------------------------------------------------------------------------